[Zope-dev] z3c.form update issues

Dan Korostelev nadako at gmail.com
Sat Feb 21 12:52:16 EST 2009


2009/2/21 Roger Ineichen <dev at projekt01.ch>:
> Hi all
>
> I fixed a z3c.form issue where util.Manager keys and values
> get append more then one time by calling update more then once
> on widgets or actions.
>
> For doing so, I implemented a UniqueOrderedKeys class for
> util.Manager._data_keys and a decorator which will prevent
> to override them. See z3c.form.util.py line: 120
>
> Can you please review if this and let me know it this
> is compatible with our own z3c.form parts?
>
> My motivation to deep into this is to find a better way how we
> use the update track. I think we should separate the update
> process into a setup and execute concept. I have the feeling,
> but could not really tell it right now, that we need to separate
> execute for prevent calling execute more then once during
> calling update.
>
> Update should get called more then once at least if it comes to
> calculate button/handler conditions. Because it's possible that
> an action execute call manipulates something which will change the
> button condition which we need to recalculate within an action
> update call.
>
> Any hints/ideas about that. Or do you know a good use case
> for this problem. It also smells to me that the MultiWidget or
> the ObjectWidgets implementation could be more robust within
> a better update/execute concept.

IIRC, the update and execute phases are already separated for actions
(you call actions.update() for setup and actions.execute() for actual
execting) and that fact is used in MultiWidget and many custom forms.

-- 
WBR, Dan Korostelev


More information about the Zope-Dev mailing list