I think the context of an adding view is an object providing IAdding. The context of the context might be the container of your object. Try to set isNeedtoDisplay as the container's method, and maybe "context/context/isNeedtoDisplay" as your filter.

Christophe

Ivan Horvath a écrit :
Dear All,

it seems that i have to use filter attribute in browser:addMenuItem
directive. i couldn't find any usable help how to use it, and my
trials are failed so far.

this is the menu declaration in zcml:
 <browser:addMenuItem
     title="Article"
     factory="fa.Article"
     view="addArticle.html"
     filter="context/isNeedtoDisplay"
     permission="zope.ManageContent"
     />

 <browser:page
   for="zope.app.container.interfaces.IAdding"
   name="addArticle.html"
   class=".helper.ArticleAddForm"
   permission="zope.ManageContent"
   />

i receive always a TraversalError exception. i don't know where shall
i put the isNeedtoDisplay method.
 File "D:\alco\zope\src\zope\traversing\adapters.py", line 52, in traverse
   raise TraversalError(subject, name)
- __traceback_info__: (<zope.app.publisher.browser.viewmeta.+ object at 0x02D
E9D90>, 'isNeedtoDisplay', [])
TraversalError: (<zope.app.publisher.browser.viewmeta.+ object at 0x02DE9D90>, '
isNeedtoDisplay')

thanks in advance

Ivan
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users



_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to