Commit 049a8129 authored by Sebastien Robin's avatar Sebastien Robin

define the method getTitle and setTitle


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2191 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b8b150df
...@@ -1755,3 +1755,18 @@ class TempBase(Base): ...@@ -1755,3 +1755,18 @@ class TempBase(Base):
def setUid(self, value): def setUid(self, value):
self.uid = value # Required for Listbox so that no casting happens when we use TempBase to create new objects self.uid = value # Required for Listbox so that no casting happens when we use TempBase to create new objects
def setTitle(self, value):
"""
Required so that getProperty('title') will work on tempBase objects
The dynamic acquisition work very well for a lot of properties, but
not for title. For example, if we do setProperty('organisation_url'), then
even if organisation_url is not in a propertySheet, the method getOrganisationUrl
will be generated. But this does not work for title, because I(seb)'m almost sure
there is somewhere a method '_setTitle' or 'setTitle' with no method getTitle on Base.
That why setProperty('title') and getProperty('title') does not work.
"""
self.title = value
def getTitle(self):
return getattr(self,'title',None)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment