[Zope] How do I get product to return other than ZMI page?
John Schinnerer
johnschinnerer at yahoo.com
Sat Mar 27 16:56:33 EST 2004
Hello,
I have created a product using mxmObjectManager as a base.
I have a web form so a client can add these objects to folders from
outside the ZMI.
It works, but always returns the ZMI manage_main page (without left nav
frame) for the folder the object was added to.
Instead, I want to return to the empty 'add object' web form to add
another.
The web form invokes a python script to get to the manage_addAction
method in the product:
# pertinent pythonscript code
request = container.REQUEST
RESPONSE = request.RESPONSE
context.manage_addProduct['myProduct'].manage_addAction(request.id,request)
from the mxm README example, for manage_addAction I am using
def manage_addAction(self, id=None, REQUEST=None)
"Add instance to parent ObjectManager"
mxmObjectManager.addClass(self, id, myProduct, REQUEST)
...plus it then sets properties of the added object and creates some
StructuredDocument objects inside the added object. That all works
fine. However...
No matter what code I put in to try and return something else - at the
end of manage_addAction or in the python script that calls it - the
result is that the ZMI manage_main page is what I always get back.
I'm guessing that the manage_addProduct['myProduct'] in the script is
somehow hijacking the return from manage_addAction and returning the
ZMI page...??
If so, and in any case, how can I return something other than that,
like the web form again?
thanks,
John S.
__________________________________
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