[Product-Developers] z3c.form widget traversal and validation

David Glick davidglick at groundwire.org
Fri Mar 5 00:17:39 UTC 2010

I have a z3c.form form that overrides its getContent method based on a
property of the current authenticated member.  That is, the data being
edited by the form depends on which user is logged in.

This form also has a NamedImage field (from plone.namedfile), which
displays a preview of the current image by traversing to ++widget++logo
on the form (logo is the name of the field).

But this doesn't work in this case, because in order to traverse to a
widget, the code that handles this traversal (in
plone.z3cform.traversal) must call the form's update method, which in
turn calls updateWidgets.  But update also relies on being able to get
the form's data, so it calls getContent, which fails because there is no
authenticated member yet, since authentication happens after traversal.

Any ideas about how I can get out of this pickle?


David Glick
Web Developer
davidglick at groundwire.org

ONE/Northwest is now Groundwire!

More information about the Product-Developers mailing list