If that works: Ooh sneaky ;¬) Phil phil@phih.org -----Original Message----- From: michel@digicool.com [mailto:michel@digicool.com] Sent: 10 October 1999 22:40 To: Joseph Santaniello Cc: zope@zope.org Subject: Re: [Zope] dtml call for copying items? Joseph Santaniello wrote:
Hi Everyone,
I'm trying to get some dtml code to copy a folder a user selects from a form, but I can't get it to work. Here are some snippits:
from form:
<input type="radio" name="ids:list" value="...
from form processor:
<!--#call "manage_copyObjects(ids)"--> <!--#call "manage_pasteObjects()"--> <!-- stuff to change the new folder's name...
I don't get any error on the copy, but the paste says the clipboard is empty.
That's because the mechanism works based on cookies. Since there is no browser involved in your code, and no cookie in the original 'REQUEST', pasteObjects say's there clipboard is 'empty'. You would have to dig a bit in the source to find a way around this. Might just involve a combination of DTML calls, buit it might involve some python hacks. Wait.. there is a million to one chance this might work, but I haven't tested it, I just dreamed it up: <dtml-if paste_objects> <dtml-call "manage_pasteObjects()"> <dtml-else> <dtml-call "manage_copyObjects(ids)"> <dtml-if QUERY_STRING> <dtml-call "RESPONSE.redirect(absolute_url() + '&paste_objects=')"> <dtml-else> <dtml-call "RESPONSE.redirect(absolute_url() + '?paste_objects=')"> </dtml-if> </dtml-if> You might need to play with it. -Michel _______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope (Related lists - please, no cross posts or HTML encoding! To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )