[Zope3-dev] Proposal for more widgets cleanup

Janko Hauser jhauser at zscout.de
Tue Oct 12 11:30:02 EDT 2004


Garrett Smith wrote:
> This proposal deals with some rough edges associated with the way
> widgets handle errors. If you haven't written any of your own widgets,
> it should not impact your code.
>
> The proposal incorporates input from Marius Gedminas and Jim.
>
>   http://dev.zope.org/Zope3/MoreCleanupOfWidgets
>

Some questions, perhaps not all directly related to the proposal. It can
be, that I do not use widgets totally right or to the full extent.

+1 to all points regarding the change of the error handling.

to point 8:
Doesn't the collection of the html rendering in one macro file make it
harder to overwrite stuff? Can this be changed in ZCML and/or
programmatically. For example the widget could decide to render itself
differently in case of some special error.

I understand widgets as some kind of viewclass_method, which processes
the information and then delegates to a template for rendering. Is this
possible with the current approach?

to point 9:
It looks funny to set the error twice. Where is the widget errors list
to be used? Is it during the rendering of the InputWidget in the
returned form? Then why set it in self again.

Then not directly related to the proposal:

There are many cases, where a field does need different widgets, or a
widget, which handles some cases different. Also fields are changing
their configured state during their lifetime, and would need perhaps
different widgets then. One example would be the readonly fields
'modified' and 'created'.

At the moment the widgets are differentiated between Input and Display,
but it can be, that one widget is used to display a field readonly only
in some situations, which are overall Input contexts.

Jim mentioned the example of adding something, where one would key
something in, but which would be readonly afterwards. One can place
these things in intelligent widgets, but these would be harder to
replace. Are there other ways?

Or I would like to display the 'modified' data only readonly but clearly
want to change the field in the normal application. But a manager should
be allowed to change the last modified entry.

With regards,

__Janko




More information about the Zope3-dev mailing list