[Zope-CMF] listFilteredActionsFor

Florent Guillaume fg@nuxeo.com
Fri, 19 Jul 2002 14:49:51 +0000 (UTC)


Chris McDonough <chrism@zope.com> wrote:
> "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.

Yes yes yes yes.

In the same vein (not sure right now if the same piece of code is
involved), I'd like to add any key I want in the
factory_type_information datastructure of my filesystem products and
have them be kept along.

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

Yes.

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

I'm all for it.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com