Zope Gurus: this is a tricky one, _please_ help
No one has yet been able to help me in this matter... I need to copy an object into the current folder via manage_clone or whatever other method there is. The problem is that the object cannot be reached by acquisition, because it resides in some other folder: /__zope |_____folder | |_____object1 | |_____object2 | |_____object3 | |_____current_folder It would be ease to simply call "manage_clone(folder.object1,'newname',REQUEST)" of course, but the selected object comes from a list in a DTML form and thus the ID cannot be hardcoded. The user selects an ID from the list, hits a button and the next DTML Document is supposed to clone the selected object into the current directory. If I put something like "manage_clone(REQUEST['input'],'newname',REQUEST)" I get an error: -> Error Type: AttributeError -> Error Value: 'string' object has no attribute 'cb_isCopyable' I tried all kinds of variations for the first parameter of manage_clone, and it works if the desired object can be called by acquisition (e.g. if it's in the root folder), but as soon as the object is in a subfolder, everything breaks. Please help me, I urgently need this feature in my appliction - and time runs out. ;-) Thanks so far, Heiko. P.S.: yes, I also tried copy and paste, but the pasteObjects() bailed, too. -- Heiko Stoermer MIG Augsburg
Zopistas I have not followed the Zope world for a while and ... ZClasses, ZCatalog XMLDocument ... DC slow down so we can keep up! On Thu, 26 Aug 1999, Heiko Stoermer wrote:
It would be ease to simply call "manage_clone(folder.object1,'newname',REQUEST)" of course, but the selected object comes from a list in a DTML form and thus the ID cannot be hardcoded. The user selects an ID from the list, hits a button and the next DTML Document is supposed to clone the selected object into the current directory.
If I put something like "manage_clone(REQUEST['input'],'newname',REQUEST)" I get an error: -> Error Type: AttributeError -> Error Value: 'string' object has no attribute 'cb_isCopyable'
I would think that something like: <!--# manage_clone(_.getitem(input,0),'newname',REQUEST)--> or maybe <!--# manage_clone(_.getitem(_['input'],0),'newname',REQUEST)--> should work but then again I haven't used Zope for a while ... Pavlos
Pavlos Christoforou wrote:
Zopistas
I have not followed the Zope world for a while and ... ZClasses, ZCatalog XMLDocument ... DC slow down so we can keep up!
On Thu, 26 Aug 1999, Heiko Stoermer wrote:
It would be ease to simply call "manage_clone(folder.object1,'newname',REQUEST)" of course, but the selected object comes from a list in a DTML form and thus the ID cannot be hardcoded. The user selects an ID from the list, hits a button and the next DTML Document is supposed to clone the selected object into the current directory.
If I put something like "manage_clone(REQUEST['input'],'newname',REQUEST)" I get an error: -> Error Type: AttributeError -> Error Value: 'string' object has no attribute 'cb_isCopyable'
I would think that something like:
<!--# manage_clone(_.getitem(input,0),'newname',REQUEST)--> or maybe <!--# manage_clone(_.getitem(_['input'],0),'newname',REQUEST)-->
unfortunately, neither of these work... they produce key errors. But thanks anyway! Heiko -- Heiko Stoermer MIG Augsburg
On Thu, 26 Aug 1999, Heiko Stoermer wrote:
Pavlos Christoforou wrote:
I would think that something like:
<!--# manage_clone(_.getitem(input,0),'newname',REQUEST)--> or maybe <!--# manage_clone(_.getitem(_['input'],0),'newname',REQUEST)-->
Heiko - I missed the crucial point that the object you wish to clone is not in your acquisition path. Thiis should work. (I tested it) <!--# call "manage_clone(_.getattr(folder,input),'newtest',REQUEST)"--> I called this DTML method like http://.../clone_mathod?input=test and it worked fine Pavlos
participants (2)
-
Heiko Stoermer -
Pavlos Christoforou