Hi! 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 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? Thanks! -- Mis Cosas http://blogs.sistes.net/Garito Zope Smart Manager http://blogs.sistes.net/Garito/670
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
Ok Then I put another function into the monkey patch to rename the objects Did you try to install the product? I'm specially interested in the opinions of big helpers like you Thank you very much! 2008/1/11, Dieter Maurer <dieter@handshake.de>:
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
-- Mis Cosas http://blogs.sistes.net/Garito Zope Smart Manager http://blogs.sistes.net/Garito/670
Garito wrote at 2008-1-11 19:55 +0100:
... Did you try to install the product?
I try only products the description of which clearly indicates that I need them. You decided to let your code speak -- but this has no chance with me :-) -- Dieter
What a pity! Doesn't matter but is a lost chance to understand the other If some time you would like to evaluate it I will thank you Thanks! 2008/1/13, Dieter Maurer <dieter@handshake.de>:
Garito wrote at 2008-1-11 19:55 +0100:
... Did you try to install the product?
I try only products the description of which clearly indicates that I need them.
You decided to let your code speak -- but this has no chance with me :-)
-- Dieter
-- Mis Cosas http://blogs.sistes.net/Garito Zope Smart Manager http://blogs.sistes.net/Garito/670
participants (2)
-
Dieter Maurer -
Garito