Am Sonntag, 11. September 2005 20:25 schrieb Stephan Richter:
> On Sunday 11 September 2005 10:07, Florian Lindner wrote:
> > The field is displayed when the addform is called with
> > folder/+/AddCSLink.html.
>
> In this case AddCSLink.html is a view for IAdding.
>
> > When folder/AddCSLink.html is is not displayed.
>
> Here AddCSLink.html is a view of IContainer.
>
> > What is the difference between these two?
>
> I am surprised both would work. Only the first one should.

Advertising

Both forms are displayed. But when I tried to actually add the object the
latter way (which is not supposed to work) generates a system error:
File "/home/florian/Zope3/src/zope/app/form/browser/add.py", line 134, in
add
return self.context.add(content)
ForbiddenAttribute: ('add', <CS.ContentFolder.contentfolder.ContentFolder
object at 0xb3041fac>)
The first one works.
> > Unfortunatly when you use the addform directive to register a menu item
> > the action is folder/AddCSLink.html. Can this be changed?
>
> Don't use the menu/title attributes of form:addform. Use the
> browser:addMenuItem directive instead.
Ok. But why does the addform directive registers a menu item with a action
which is not even supposed to work? Isn't that considered a bug?
Florian
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users