[Zope-CMF] listFilteredActionsFor

Chris McDonough chrism@zope.com
Wed, 17 Jul 2002 17:04:12 -0400


"Object actions" in the ActionTool's listFilteredActions for are
lifted off of the object via a call to the object's type's
'getActions()' method.  The elements of an object actions dictionary
are limited to certain keys by this method -- it essentially creates
a new dictionary that only has 'id', 'name', 'action', 'url',
'permissions', 'category', and 'visible'.

It would be more useful if listFilteredActionsFor created a copy of
the original actions dictionary and munged certain keys and values
if necessary, but otherwise left key/value pairs that it didn't know
about alone.  This would allow people to create key/value pairs that
are useful (such as "action_html", which could specify some HTML to
use as a toolbar icon or whatnot), but that are not explicitly
supported by the "normal" action structure.

I realize that the TTW action modification methods in ActionsTool
would also need to be changed to not stomp on these values.

This is in support of iconic action toolbars.  Does anybody hate
this idea (or better yet, have a better idea?)

- C