[Zope3-Users] Can't rename objects

Florian Lindner mailinglists at xgm.de
Tue Jan 16 16:37:25 EST 2007


Am Dienstag, 16. Januar 2007 22:15 schrieb Christian Theune:
> Do you have a specific exception with traceback that prevents you from
> renaming?

So far I have tried it only using the ZMI (logged in as manager). There is no 
rename button and also if I add another object I can't name it, it's just 
names like "Folder-n". Just no possibility to even try.
How to test it best programmatically?

The security declarations are:

<require permission="zope.Public" interface=".interfaces.IXGM" />
<require permission="zope.ManageContent" set_schema=".interfaces.IXGM" />

Thanks,

Florian


>
> Christian
>
> Am Dienstag, den 16.01.2007, 21:05 +0100 schrieb Florian Lindner:
> > Hello,
> > I have a container object to which I can add and remove object but can
> > not rename them. I suspet my I namechooser to be faulty:
> >
> > from zope.app.container.interfaces import INameChooser
> > from zope.app.container.contained import NameChooser
> >
> > class XGMNameChooser(NameChooser):
> >     implements(INameChooser)
> >
> >     def chooseName(self, name, object):
> >         if IAbbreviation.providedBy(object):
> >             # my name choosing code
> >             return n
> >         else:
> >             return super(XGMNameChooser, self).chooseName(name, object)
> >
> >
> > registered like that:
> >
> >     <adapter
> >         for=".interfaces.IXGM"
> >         provides="zope.app.container.interfaces.INameChooser"
> >         factory=".xgm.XGMNameChooser"
> >     />
> >
> >
> > furthermore the objects interface implements:
> >
> > IContainer, IContained, IPossibleSite, IAttributeAnnotatable,
> > IContainerNamesContainer.
> >
> > the class itself:
> >
> > BTreeContainer, SiteManagerContainer
> >
> > What's wrong?
> >
> > Thanks,
> >
> > Florian
> > _______________________________________________
> > Zope3-users mailing list
> > Zope3-users at zope.org
> > http://mail.zope.org/mailman/listinfo/zope3-users


More information about the Zope3-users mailing list