* Support general "behaviours" that can be enabled on a custom
type in a declarative fashion. Behaviours can be things like
title-to-id naming, support for locking or versioning, or sets of
standard metadata with associated UI elements.
so look at the behaviour part of Dexter
Ah I see. It is a Dexterity content type. Do you know the attribute for
Dexterity content types that is equivalent to _at_rename_after_creation?
Thank You
--
View this message in context:
http://plone.293351.n2.nabble.com/Rename-an-object-after-it-has-been-added-tp6625176p6625912.html
Sent from
Il 27/07/2011 14:13, imran.azad ha scritto:
Hi Yuri,
Many many thanks for the links, they are really helpful! :-)
I'm just unclear on how to set the _at_rename_after_creation atrribute, is
this the correct way of doing it?
class Person(Container):
implements(IPerson)
_at_rename_afte
Hi Yuri,
Many many thanks for the links, they are really helpful! :-)
I'm just unclear on how to set the _at_rename_after_creation atrribute, is
this the correct way of doing it?
class Person(Container):
implements(IPerson)
_at_rename_after_creation = False
Thank you in adavance.
--
V
Il 27/07/2011 13:05, imran.azad ha scritto:
Thank you, Yuri. Do you know how I can override the original method from my
code or disable it altogether? Thanks in advance.
http://plone.org/documentation/manual/plone-community-developer-documentation
this is the place with almost all you need
Thank you, Yuri. Do you know how I can override the original method from my
code or disable it altogether? Thanks in advance.
--
View this message in context:
http://plone.293351.n2.nabble.com/Rename-an-object-after-it-has-been-added-tp6625176p6625689.html
Sent from the Product Developers mailing
Il 27/07/2011 12:31, imran.azad ha scritto:
Hi Jung,
I have checked in the same folder there isn't an id that already exists. Why
is it that when I modifiy the item the same code excutes sucessfully?
When an object is created, an event is fired. This event trigger a
method that already re
Hi Jung,
I have checked in the same folder there isn't an id that already exists. Why
is it that when I modifiy the item the same code excutes sucessfully?
--
View this message in context:
http://plone.293351.n2.nabble.com/Rename-an-object-after-it-has-been-added-tp6625176p6625611.html
Sent from
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
The error message is self-speaking. You are trying to rename an object
to some id which already exists inside the same folder.
- -aj
imran.azad wrote:
> I want to rename the id or the 'short name' as soon as an object is
> either added or modified. I
I want to rename the id or the 'short name' as soon as an object is either
added or modified. I have managed to achieve this via the code below:
@grok.subscribe(IPerson, IObjectModifiedEvent)
def rename(person, event):
parent = person.aq_parent
parent.manage_renameObject(person.getId(), s
10 matches
Mail list logo