[Zope] Add an object and subobjects in a single pass?
VanL
vlindberg@verio.net
Wed, 24 Jul 2002 10:28:14 -0600
Hello,
I'm working with the Kube Product, and I have a situation where I would
like to add a Kube (for those who are not familiar with it, it is
basically a folder) and then add another Kube within the first -- but do
it during a single pass.
Currently, I have the following:
(foo and bar are specializations of Kube -- they have the same
interface, tho)
id1, id2 = 'f', 'b'
f = foo()
f.id = id1
f.title = 'Foo Object'
self._setObject(id1, f)
f = self._getOb(id1)
b = bar()
b.id = id2
b.title = 'Bar Object'
self._setObject(id2, b)
b = self._getOb(id2)
From here I have tried
f.bar = b,
f._setObject('bar', b)
Both of these create a bar object that is a subobject of foo. I can go to
http://host/foo/bar and I see bar. However, when I look at foo, I can't
see bar as a subobject (like a folder would normally show a subobject.)
Also, I add properties to bar, but I can't seem to get at them anywhere
through the management interface.
Any help?
Thanks,
VL