[Zope-CMF] Re: Function Removal if Item is locked.

Tres Seaver tseaver@zope.com
13 Mar 2003 14:28:33 -0500


On Thu, 2003-03-13 at 08:51, Florent Guillaume wrote:
> On Thu, 2003-03-13 at 14:39, Yuppie wrote:
> > Florent Guillaume wrote:
> > > What I really want is *arbitrary* properties on actions. Target is just
> > > one of lots of special cases (onclick, image, color, etc., come to
> > > mind).
> > 
> > image?? color???
> > 
> > These examples sound like you want to store layout inside 
> > ActionInformation. Shouldn't images and colors be defined in the skins?
> 
> No, I want to store arbitrary metadata on the action. I'll then use it
> as I see fit when I display the action box.
> 
> Instead of image, understand "icon_name" for instance. "target" is
> another good example. There could be arbitrary rollover information to
> associate to that action too. And so on. That's juste metadata. They
> could be simply key to actual data stored in a skin, but I need to have
> the key there.

We have been using a pattern where we store such metadata in a separate
tool, keyed to 'category,action_id';  this both keeps the action
providers simple, and allows for uniformity (all 'object,edit' actions
get the same icon / target / whatever).

I'm not averse to being able to set arbitrary properties on ActionInfo
objects, as long as the person who adds that deals with any
compatibility issues which may arise.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com