Hi Gary,

> -----Original Message-----
> From: Gary Poster [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, May 17, 2006 7:36 PM
> Cc: zope3-dev@zope.org
> Subject: Re: [Zope3-dev] Formlib error handling
> On Apr 22, 2006, at 11:31 AM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
> wrote:
> > The formlib.EditForm dosen't catch all errors form widgets.
> ...
> Hey Roger.  Your email has been sitting open on my computer 
> for weeks, reminding me to reply, and I want to get rid of 
> it. :-)  Did you put a collector issue in for this, or was it 
> resolved in some other way?

I solve the problem and added some bugfix, see the different 
commit messages below.

I think the error handling is pretty Ok in the formlib now.
Feel free to ask if somthing is unclear. I'm pretty sure
that we very extensivly used the formlib in our project.
Most improvments depend on useing the formlib with subforms
where we setup in the update method.
Some implementation use also the zc.table implementation.

What I like to implement, is a generic "sub form setup"
method which should make it easier to setup sub-forms.

Log message for revision 68157:
  - Improve error handling in formlib:
    Fix invariant error handling in formlib. The exception Invalid raised 
    in interface invariants where end in a component lookup error because
    this exception didn't get converted to a usefull error message.
    Now the error_views method in formlib can handle strings and i18n 
    Message based Invalid exceptions.
  - Added test for Invalid exceptions handling
  - Added also a small fix which makes sure that existing errors
    from master/subforms don't get overriden by calling update in 
  - Added note in Changes.txt

  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/src/zope/formlib/form.py
  U   Zope3/trunk/src/zope/formlib/tests.py

Log message for revision 67282:
  Fix error handling
  Widget have to raise WidgetInputError and not ValidationError
  directly. Improve sequence input widget base class methods
  getInputValue. This will ensure that sequence widgets will
  set the raised error to the _error attribute before the error
  get raised.

  U   Zope3/trunk/src/zope/app/form/browser/sequencewidget.py
  U   Zope3/trunk/src/zope/app/form/browser/tests/test_sequencewidget.py

Log message for revision 67279:
  And added missing import

  U   Zope3/trunk/src/zope/formlib/form.py

Log message for revision 67278:
  Fix error handling, please double check this!
  The formlib.form.EditForm doesn't handle ValidationError in the
  method error_views. 
  I converted ValidationError to WidgetInputError in the method
  getWidgetsData which is responsible to catch errors raised by
  the widget getInputValue method.

  U   Zope3/trunk/src/zope/formlib/form.py

Roger Ineichen

> Thanks
> Gary

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to