Commit 79e2cc7d authored by 's avatar

Added document_id, document_title

parent 197cce8d
"""Document object""" """Document object"""
__version__='$Revision: 1.14 $'[11:-2] __version__='$Revision: 1.15 $'[11:-2]
from Globals import HTML from Globals import HTML
from Globals import HTMLFile from Globals import HTMLFile
...@@ -13,7 +13,7 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__): ...@@ -13,7 +13,7 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__):
"""A Document object""" """A Document object"""
meta_type ='Document' meta_type ='Document'
icon ='OFS/Document_icon.gif' icon ='OFS/Document_icon.gif'
__state_names__=HTML.__state_names__+('title','__roles__') __state_names__=HTML.__state_names__+('title','__roles__')
_formhead=""" _formhead="""
...@@ -66,6 +66,8 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__): ...@@ -66,6 +66,8 @@ class Document(HTML, RoleManager, SimpleItem.Item_w__name__):
self.func_defaults=(None,) self.func_defaults=(None,)
def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw):
kw['document_id'] =self.id
kw['document_title']=self.title
r=apply(HTML.__call__, (self, client, REQUEST), kw) r=apply(HTML.__call__, (self, client, REQUEST), kw)
if RESPONSE is None: return r if RESPONSE is None: return r
return decapitate(r, RESPONSE) return decapitate(r, RESPONSE)
......
__doc__="""Object Manager __doc__="""Object Manager
$Id: ObjectManager.py,v 1.11 1997/09/25 14:30:39 brian Exp $""" $Id: ObjectManager.py,v 1.12 1997/09/25 15:43:35 brian Exp $"""
__version__='$Revision: 1.11 $'[11:-2] __version__='$Revision: 1.12 $'[11:-2]
from SingleThreadedTransaction import Persistent from SingleThreadedTransaction import Persistent
...@@ -296,8 +296,9 @@ class ObjectManager(Acquirer,Management,Persistent): ...@@ -296,8 +296,9 @@ class ObjectManager(Acquirer,Management,Persistent):
def manage_addProperty(self,id,value,type,REQUEST): def manage_addProperty(self,id,value,type,REQUEST):
"""Add a new property (www)""" """Add a new property (www)"""
try: value=type_converters[type](value) # try: value=type_converters[type](value)
except: pass # except: pass
value=type_converters[type](value)
self._setProperty(id,value,type) self._setProperty(id,value,type)
return self.manage_propertiesForm(self,REQUEST) return self.manage_propertiesForm(self,REQUEST)
...@@ -394,6 +395,9 @@ class ObjectManager(Acquirer,Management,Persistent): ...@@ -394,6 +395,9 @@ class ObjectManager(Acquirer,Management,Persistent):
############################################################################## ##############################################################################
# #
# $Log: ObjectManager.py,v $ # $Log: ObjectManager.py,v $
# Revision 1.12 1997/09/25 15:43:35 brian
# Added document_id, document_title
#
# Revision 1.11 1997/09/25 14:30:39 brian # Revision 1.11 1997/09/25 14:30:39 brian
# Fixed property typing error # Fixed property typing error
# #
......
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