[Zope-CMF] Re: [dev] refactoring listFilteredActionsFor: a
proposal
Florent Guillaume
fg at nuxeo.com
Thu Nov 20 13:58:32 EST 2003
> > > It's not enforced these paths are unique, but duplicates are ignored.
> >
> > I may be an interesting use case to give different actions
> > the same id but use them with different (disjoint) conditions.
> >
> > If you want to support such use cases, you should ignore
> > duplicates only after filtering.
> >
> > Personally, I have no pressing need for these cases and I would
> > require that ids are unique (within a single ActionProvider).
I must concur with Dieter, it's quite important that we still be able to
have actions like:
id: edit
category: object
condition: something
url: some_url
id: edit
category: object
condition: not: something
url: another_url
And have all the filtering methods return only the correct one when
'edit' is requested.
> I'd really like to have an unique identifier. That would help to resolve
> issues like that: <http://collector.zope.org/CMF/195>
You need a different kind of identifier then. The identifier of actions
is used for filtering, historically nothing implied it would be unique.
> Regarding the use case you describe: Wouldn't it be sufficient to use
> different categories like we have for 'folderContents' in ActionsTool?
> You could use subcategories like 'globalCase1' and 'globalCase2'.
I don't want to change categories just because the backend cannot filter
correctly. Categories are an important classification mechanism.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg at nuxeo.com
More information about the Zope-CMF
mailing list