--- a/web/formwidgets.py Tue Feb 23 12:46:56 2010 +0100
+++ b/web/formwidgets.py Tue Feb 23 12:49:37 2010 +0100
@@ -59,21 +59,6 @@
def _render(self, form, field, renderer):
raise NotImplementedError()
- def typed_value(self, form, field):
- """return field's *typed* value specified in:
- 3. extra form values given to render()
- 4. field's typed value
- """
- qname = field.input_name(form)
- for key in (field, qname):
- try:
- return form.formvalues[key]
- except KeyError:
- continue
- if field.name != qname and field.name in form.formvalues:
- return form.formvalues[field.name]
- return field.typed_value(form)
-
def format_value(self, form, field, value):
return field.format_value(form._cw, value)
@@ -118,6 +103,21 @@
values = (values,)
return values
+ def typed_value(self, form, field):
+ """return field's *typed* value specified in:
+ 3. extra form values given to render()
+ 4. field's typed value
+ """
+ qname = field.input_name(form)
+ for key in ((field, form), qname):
+ try:
+ return form.formvalues[key]
+ except KeyError:
+ continue
+ if field.name != qname and field.name in form.formvalues:
+ return form.formvalues[field.name]
+ return field.typed_value(form)
+
def process_field_data(self, form, field):
posted = form._cw.form
val = posted.get(field.input_name(form, self.suffix))
--- a/web/views/forms.py Tue Feb 23 12:46:56 2010 +0100
+++ b/web/views/forms.py Tue Feb 23 12:49:37 2010 +0100
@@ -179,6 +179,7 @@
renderer = self.default_renderer()
return renderer.render(self, values)
+
_AFF = uicfg.autoform_field
_AFF_KWARGS = uicfg.autoform_field_kwargs
@@ -259,8 +260,7 @@
for field in self.fields:
if field.eidparam:
edited.add(field.role_name())
- self.add_hidden('_cw_edited_fields', u','.join(edited),
- eidparam=True)
+ self.add_hidden('_cw_edited_fields', u','.join(edited), eidparam=True)
def default_renderer(self):
return self._cw.vreg['formrenderers'].select(