[Zope] Programmatic adding of StructuredDocument
John Schinnerer
johnschinnerer at yahoo.com
Thu Mar 25 20:27:29 EST 2004
Hello,
I said:
> I also want to create programmatically, *inside* the folderish
> object, several StructuredDocuments.
So after much poking about...this works to add multiple
StructuredDocument objects *inside* the folderish object being added
first:
def manage_addAction(...):
mxmObjectManager.addClass(...)
newObjId = getattr(self,id)
newObjId.manage_addProduct['StructuredDocument'].StructuredDocument.manage_addStructuredDocument('STXdocOne',...)
newObjId.manage_addProduct['StructuredDocument'].StructuredDocument.manage_addStructuredDocument('STXdocTwo',...)
...
and so on.
If that could be cleaner and/or simpler I'd love to hear about it.
thx,
John S.
> I tried this:
> def manage_addAction():
> mxmObjectManager.addClass()
> StructuredDocument.manage_addStructuredDocument()
>
> This does add a Structured Document, but it is created alongside the
> folderish object instead of inside it.
>
> How do I get the StructuredDocument to be created inside the
> folderish object I have just added?
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
More information about the Zope
mailing list