[Zope-dev] locatability of objects inside a list in bluebream
Joshua Immanuel
josh at hipro.co.in
Thu Aug 25 03:54:58 EDT 2011
Hello all,
I have a following interface definitions
class IMyListObject(Interface):
name = TextLine(
title=u'Name')
class IMyObject(Interface):
name = TextLine(
title=u'Name')
...
my_list = List(
title=u'My Object list',
value_type=Object(
title='My List Object',
schema=IMyListObject)
)
For adding the 'IMyListObject' into the my_list of 'IMyObject' I created
a browser page for 'IMyObject' with zope.formlib AddForm's form_fields
set to 'IMyListObject' and appended them to the 'my_list' field. That
part works great.
But I like to know, what is the preferred way of making objects inside
the 'my_list' to be locatable. So that I can have an edit page or a
display page for the 'IMyListObject' in that list.
One approach what I thought was to make 'IMyObject' as a container with
all other schema fields in place except the 'my_list' field and add the
'IMyListObject' to the 'IMyObject' as child objects, so that all the
'IMyListObject' objects are locatable.
But I really wanted to know if it is possible to make objects inside a
list locatable as that would be necessary in the case of creating an
object tree of the following format.
class INode(Interface):
parent = Object(
title=u"Parent node",
schema=Interface
)
children = List(
title=u'Child nodes',
value_type=Object(schema=Interface)
)
INode['parent'].schema = INode
INode['children'].value_type.schema = INode
Please guide me in this regard.
[Sorry for always cross posting to both bluebream and zope-dev mailing
lists. Also I find another not so active zope3-users mailing list
available. As most of my queries gets answered from zope-dev mailing
list I am still in confusion on which mailing list to single out. Kindly
bear with me.]
Regards
--
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20110825/65a16466/attachment.bin
More information about the Zope-Dev
mailing list