[Zope-CMF] Proposal: Action expression contexts

Dieter Maurer dieter at handshake.de
Wed Apr 1 15:11:26 EDT 2009


Miles wrote at 2009-3-31 10:10 +0100:
>One of the things that we find slightly cumbersome here in our 
>applications is that when defining actions, there's no easy way to 
>adjust the variables available to an expression.  This tends to make the 
>expressions longer and harder to read, plus commonly used variables are 
>calculated multiple times.
>
>For example, my application has a concept of a "page", and I would like 
>to make this available as a variable rather than work it out each time.
>
>Therefore I think it would be useful to adjust getExprContext in 
>CMFCore.Expression so that it is pluggable, by using a factory to create 
>the ExpressionContext.  In that way I can register different ones as 
>required.
>
>Is this a desirable change?

I like it.



-- 
Dieter


More information about the Zope-CMF mailing list