[Zope3-dev] Access to widget errors
Marius Gedminas
mgedmin at b4net.lt
Mon Sep 13 07:52:51 EDT 2004
On Sat, Sep 11, 2004 at 10:09:31AM -0500, Garrett Smith wrote:
> I would just update the proposal with the first part you mentioned.
<...>
I updated http://dev.zope.org/Zope3/AccessToWidgetErrors
The only remaining fuzzy issue is the side effect of getInputError.
Scenario:
1. view code calls getWidgetValues()
2. widget1.getInputError is called and sets widget1.error to None
3. view code does additional validation and sets widget1.error to err
4. the page template is rendered and calls widget1()
5. widget1.__call__() calls _getFormValue which calls getInputValue which
resets widget1.error to None
6. the page template renders widget1/error, which is None
I see two solutions:
- getInputValue should only set self.error if self.error is None;
otherwise it should not touch self.error.
- BrowserWidget._getFormValue should save self.error and restore
it after calling getInputValue.
Thoughts?
Marius Gedminas
--
There is a 70% probability of tomorrow. (Actual weatherman quote, 1988)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20040913/a80a0e0e/attachment.bin
More information about the Zope3-dev
mailing list