menuItemor addMenuItem issue /was RE: [Zope3-dev] PAU bug

Roger Ineichen dev at projekt01.ch
Thu Mar 31 19:45:32 EST 2005


Behalf Of Roger Ineichen
> Sent: Friday, April 01, 2005 1:01 AM
> To: zope3-dev at zope.org
> Cc: 'Garrett Smith'
> Subject: [Zope3-dev] PAU bug
> 
> Wrong IAdding view concept
> 
> There are some problems in the PAU regsitration or better
> say in the Plugins registration.
> 
> Every global registred item (for adding) like:
> 
>   <menuItem
>       for="zope.app.container.interfaces.IAdding"
>       menu="add_component"
>       action="utility.ContentComponentDefinition"
>       title="Content Component Definition"
>       description="A Persistent Content Component Definition"
>       permission="zope.ManageServices"
>       />
> 
> get listed in the PAU Plugins "Add Menu".
> This means the "add_component" menu is used.
> 
> If we do this we need a constraints in the __setitem__ method
> of one interface used in the PAU for make a constraints
> what's can be added in the Plugins container.
> 
> If we do this we have to make sure taht all items (Plugins)
> provide this contraint.
> 
> If we don't use a constraint. we have to use a own Adding
> view for the Plugins part. This Adding view can be used for 
> items to get added to.
> 
> a) The use of a __setitem__ constraints makes required that
> items have to fit this constraint.
> 
> b) The use of a own IAdding (view) implemenetation
> is a cleaner way. I think.
> 
> btw,
> And since I refactored the addMenuItem directive it is 
> possible to use addMenutItem instead of menuItem
> for exactly this concept.
> 
> What sould we use? What's the better way? 

I think it's not important to fix this right now.
I added a issue to the bugtracker with a solution.

http://www.zope.org/Collectors/Zope3-dev/391


Regards
Roger Ineichen



More information about the Zope3-dev mailing list