[Zope3-dev] Access to widget errors

Garrett Smith garrett at mojave-corp.com
Sat Sep 11 11:09:31 EDT 2004


Marius Gedminas wrote:

> Do you think I should split my proposal into two?  One would deal with
> rendering widget errors without mandatory HTML -- we both agree on
> this part.  The other proposal would deal with errors and cross-field
> validation.  I'm still not sure if I've explained the second problem
> well enough.

I would just update the proposal with the first part you mentioned.
Specifically:

- Change error() to error (method rendering HTML to non-required attr
providing IWidgetInputError) -- this would be defined in IInputWidget

- Delete IWidgetInputErrorView and its one implementation

- Change widget_macros.pt to implement the appropriate error display for
the default layer

As for the validation, you can do this without subscribers, for now.
Your view class would perform the form level validation. I'm doing this
with some views now and it works. Having the settable error attr on the
widget will let you contol which error is displayed for a specific
widget.

 --Garrett


More information about the Zope3-dev mailing list