99 form = self._cw.vreg['forms'].select('edition', self._cw, rset=entity.cw_rset, |
99 form = self._cw.vreg['forms'].select('edition', self._cw, rset=entity.cw_rset, |
100 row=entity.cw_row, col=entity.cw_col, |
100 row=entity.cw_row, col=entity.cw_col, |
101 entity=entity, |
101 entity=entity, |
102 submitmsg=self.submited_message()) |
102 submitmsg=self.submited_message()) |
103 self.init_form(form, entity) |
103 self.init_form(form, entity) |
104 self.w(form.render(formvid=u'edition')) |
104 self.w(form.render()) |
105 |
105 |
106 def init_form(self, form, entity): |
106 def init_form(self, form, entity): |
107 """customize your form before rendering here""" |
107 """customize your form before rendering here""" |
108 pass |
108 pass |
109 |
109 |
232 |
232 |
233 def call(self, **kwargs): |
233 def call(self, **kwargs): |
234 """a view to edit multiple entities of the same type the first column |
234 """a view to edit multiple entities of the same type the first column |
235 should be the eid |
235 should be the eid |
236 """ |
236 """ |
237 #self.form_title(entity) |
|
238 form = self._cw.vreg['forms'].select(self.__regid__, self._cw, |
|
239 rset=self.cw_rset, |
|
240 copy_nav_params=True) |
|
241 # XXX overriding formvid (eg __form_id) necessary to make work edition: |
237 # XXX overriding formvid (eg __form_id) necessary to make work edition: |
242 # the edit controller try to select the form with no rset but |
238 # the edit controller try to select the form with no rset but |
243 # entity=entity, and use this form to edit the entity. So we want |
239 # entity=entity, and use this form to edit the entity. So we want |
244 # edition form there but specifying formvid may have other undesired |
240 # edition form there but specifying formvid may have other undesired |
245 # side effect. Maybe we should provide another variable optinally |
241 # side effect. Maybe we should provide another variable optinally |
246 # telling which form the edit controller should select (eg difffers |
242 # telling which form the edit controller should select (eg difffers |
247 # between html generation / post handling form) |
243 # between html generation / post handling form) |
248 self.w(form.render(formvid='edition')) |
244 form = self._cw.vreg['forms'].select(self.__regid__, self._cw, |
|
245 rset=self.cw_rset, |
|
246 copy_nav_params=True, |
|
247 formvid='edition') |
|
248 self.w(form.render()) |
249 |
249 |
250 |
250 |
251 # click and edit handling ('reledit') ########################################## |
251 # click and edit handling ('reledit') ########################################## |
252 |
252 |
253 class DummyForm(object): |
253 class DummyForm(object): |