[Zope-CMF] [dev] Actions: lazy dict not working with DTML?

yuppie y.2004_ at wcm-solutions.de
Mon Aug 2 12:21:52 EDT 2004


Hi!


Since last week listFilteredActionsFor() returns ActionInfo objects 
instead of dictionaries. I tried to implement ActionInfo as a lazy dict 
to defer expensive processing of TALES expressions.

This seems to work with the ZPT skin, but not with the old DTML skin.

    <dtml-in user_actions mapping>
     <a href="&dtml-url;"><dtml-var name></a><br>
    </dtml-in>

Looks like this code bypasses __getitem__, but I don't understand how 
this works because I'm not a C programmer and can't read the 
TemplateDict code.

I have no idea how to get a lazy dict working with DTML, so I would fix 
this by triggering the processing of 'url' expressions within 
listFilteredActionsFor().

This fixes listFilteredActionsFor() backwards compatibility, but the new 
Action provider methods listActionInfos() and getActionInfo() would 
still cause trouble if used with DTML.


Any pointers or suggestions are welcome.

TIA,
	Yuppie



More information about the Zope-CMF mailing list