2009/2/21 Roger Ineichen <d...@projekt01.ch>:
> we should carefully review this part and probably
> add action.update after action.execute. Right now, without looking
> at the code I think we do not update actions after execute. Which
> could end in bad action handler setup because of skipped action
> condition handling after execute actions.
> I'll see later if I take another look at that part.

Ah, you mean the "update" method of the form base classes. Yeah,
there's no action update performed after executions currently. But I
don't think we should just add another updateActions call after
execution as it can be quite expensive. The button actions call their
widgets' update methods that performs another thousand of adaptations
calls. :)

However, the problem is very actual and I personally had it in some of
my forms. The most obvious use case is when we use the "delete" button
to delete all entries in the list and then we don't want to show the
"delete" button anymore.

One (probably nice) solution that comes in my mind is to make the form
somehow aware if it needs to re-update its actions and to provide a
way for the action handler to signal about that. Probably, a simple
boolean form instance variable will do the trick :)

WBR, Dan Korostelev
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to