On Jul 14, 2005, at 4:50 AM, Jan-Wijbrand Kolman wrote:
Hello,
I'm using zope.formlib (aka zc.page) for rendering (complex) forms.
I think this works out great!
Still there's something I cannot really bend my head arround and
that's dealing with invariant errors. Hopefully my explanation/
question is not too fuzzy because of that...
I think to understand that, upon form submission, the form update()
method takes care of first setting up the (edit or input) widgets,
then determining what action should be called, and just before that
validating the user input.
The validation of user input might result in errors validation and/
or invariant errors. This list of (both validation and invariant)
errors is then set on the form and can be used to display feedback
to the user.
I'm actually not using this list of errors on the form for
rendering end-user feedback, but the error() method on the indivual
rendered widget, in order to display the feedback message next to
the rendered widget.
Wouldn't it make sense to set the validation errors on the errors
attribute, and set the invariant errors on a seperate
invariant_errors attribute on the form? Or maybe there's some other
way to get hold of the invariant errors and display them seperately?
A division of the two is something we had in a previous framework and
not used (we displayed them all at the top indiscriminately, in
addition to the per-widget errors), so Jim called WHUI (We Haven't
Used It). I wanted it, and with you on my side, I think Jim is OK
with it. :-)
Gary
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com