[Zope-CMF] Re: [dev] refactoring listFilteredActionsFor: a proposal

Yuppie schubbe at web.de
Thu Nov 20 15:01:55 EST 2003


Hi!


Florent Guillaume wrote:

>>> > 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.

Well. The basic question is: Are there important use cases? If I did get 
Dieter right, he doesn't think so.

Regarding your example: Why not using this action?

   id: edit
   category: object
   condition:
   action: python: something and some_url or another_url


Cheers,
	Yuppie






More information about the Zope-CMF mailing list