[Zope3-Users] addview name not form
Julien Anguenot
ja at nuxeo.com
Mon Oct 10 13:33:07 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Florian Lindner wrote:
> Am Montag, 3. Oktober 2005 14:01 schrieb Florian Lindner:
>
>>Am Freitag, 30. September 2005 20:17 schrieb Julien Anguenot:
>>
>>>Florian Lindner wrote:
>>>
>>>>Am Donnerstag, 29. September 2005 20:25 schrieb Julien Anguenot:
>>>>
>>>>>First have a look at this :
>>>>>
>>>>>http://www.zope.org/Collectors/Zope3-dev/391
>>>>
>>>>Sorry, didn't read that thoroughly. What do you suggest at the moment
>>>>do get the desired behavior?
>>>
>>>Your ContentFolder should implement IAdding and then your example should
>>>work I guess.
>>
>>I've modified my content class directive for the addfolder:
>>
>><interface
>> interface=".interfaces.IContentFolder"
>> type="zope.app.content.interfaces.IContentType" />
>><content class=".contentfolder.ContentFolder">
>> <implements
>> interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
>> <implements
>> interface="zope.app.container.interfaces.IContentContainer" />
>> <implements
>> interface="zope.app.container.interfaces.IAdding" />
>> <factory description="CS ContentFolder" />
>> <require permission="CS.View" interface=".interfaces.IContentFolder" />
>> <require permission="CS.Edit" set_schema=".interfaces.IContentFolder" />
>></content>
>>
>>
>>And my addMenuItem:
>>
>> <addMenuItem
>> title="Link"
>> class="CS.Link.link.Link"
>> view="AddCSLink.html"
>> permission="CS.Add"
>> menu="CSaddMenu"
>> layer="centershock"
>> for="CS.ContentFolder.interfaces.IContentFolder"
>> />
>>
>>
>>it's still:
>>
>>zope.configuration.exceptions.ConfigurationError: view name AddCSLink.html
>>not found
>
>
> Does it work with your code? (the code I uploaded)
Yes, if you specify the the addMenuItem directive :
<addMenuItem
title="Link"
class="CS.Link.link.Link"
view="AddCSLink.html"
permission="zope.Public"
menu="CSaddMenu"
layer="centershock"
/>
1) specify a layer on the addMenuItem directive.
2) remove the for attribute for now until your ContentFolder class
implements IAdding.
J.
- --
Julien Anguenot | Nuxeo R&D (Paris, France)
CPS Platform : http://www.cps-project.org
Zope3 / ECM : http://www.z3lab.org
mail: anguenot at nuxeo.com; tel: +33 (0) 6 72 57 57 66
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFDSqXSGhoG8MxZ/pIRAsbgAJwP8mj0ANTJi/trUyc5QMBErmmcGQCdGbBP
U6wfgBUjSLA3+xawgO+sHXs=
=Qkvd
-----END PGP SIGNATURE-----
More information about the Zope3-users
mailing list