[Zope] manage_renameObjects and AJAX

Dieter Maurer dieter at handshake.de
Fri Jan 11 13:21:09 EST 2008


Garito wrote at 2008-1-11 17:34 +0100:
>I'm try to implement the edition part of ZSM and I begin with the rename
>objects functionality
>I create a InPlaceEditor object to rename every branch but when I submit the
>form the rename command works ok but the response is the manage_main (or
>similar) and the tree disappear

Many "manage_*" functions/methods have been designed not only to be
used as simple functions but as also part of the ZMI.
When used as ZMI functions, they must (eventually) return some HTML.
They either do this by itself returning the HTML or by redirecting
to an HTML page.

These functions often distinquish between the "normal function use"
and the "ZMI use" by looking whether "REQUEST" is passed in.
If used as a ZMI functionality, the ZPublisher will pass in "REQUEST"
automatically.

>Is there a way to make manage_renameObjects returns the changed values?
>If not I need to write another monkey_patched function, isn't it?

If you need to use these functions via the "ZPublisher", 
then it is best to make a little wrapper that is "ZPublisher" called
instead and then calls the function without passing "REQUEST".



-- 
Dieter


More information about the Zope mailing list