oops, select_object is a vreg method... tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 11 Mar 2009 19:50:33 +0100
branchtls-sprint
changeset 1066 3cebd690a114
parent 1065 0a37f90acb13
child 1067 f37ee6855e42
oops, select_object is a vreg method...
web/views/baseforms.py
--- a/web/views/baseforms.py	Wed Mar 11 19:50:05 2009 +0100
+++ b/web/views/baseforms.py	Wed Mar 11 19:50:33 2009 +0100
@@ -75,6 +75,7 @@
 
 class ChangeStateForm(EntityFieldsForm):
     id = 'changestate'
+    
     __method = StringField(name='__method', initial='set_state', widget=HiddenInput)
     state = StringField(widget=HiddenInput, eidparam=True)
     trcomment = RichTextField(eidparam=True)
@@ -100,7 +101,7 @@
         self.req.add_js('cubicweb.edition.js')
         self.req.add_css('cubicweb.form.css')
         _ = self.req._
-        form = self.select_object('forms', 'changestate', self.req, self.rset, row, col,
+        form = self.vreg.select_object('forms', 'changestate', self.req, self.rset, row, col,
                                   entity=entity, redirect_path=self.redirectpath(entity))
         self.w(form.error_message())
         self.w(u'<h4>%s %s</h4>\n' % (_(transition.name), entity.view('oneline')))