<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Palermo, Tom wrote:
<blockquote
 cite="mid4E2885D0FE18D64E9DA136C82BB7A773021091B1@bth-exchange.constellagroup.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <title></title>
  <meta content="MSHTML 6.00.2800.1528" name="GENERATOR">
  <div align="left" dir="ltr"><font color="#0000ff" size="2"><span
 class="374435100-09032006">Hi David,</span></font></div>
  <div align="left" dir="ltr"><font color="#0000ff" size="2"><span
 class="374435100-09032006"></span></font>&nbsp;</div>
  <div align="left" dir="ltr"><font color="#0000ff" size="2"><span
 class="374435100-09032006">In my last post, I wrote that I tried
calling manage_pasteObjects a variety of ways:</span></font></div>
  <div align="left" dir="ltr"><font size="2"><span
 class="374435100-09032006">context.manage_pasteObjects(context.REQUEST)</span></font></div>
  <div align="left" dir="ltr"><font><span class="374435100-09032006"><font
 size="2">context.manage_pasteObjects(context.cb_dataItems())</font> </span></font></div>
  <div><font size="2"><span class="374435100-09032006"></span></font>&nbsp;</div>
  <div><font size="2"><span class="374435100-09032006">as well as the
original:</span></font></div>
  <div><font size="2"><span class="374435100-09032006">context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST=req['__cp'])</span></font></div>
  <div><font size="2"><span class="374435100-09032006"></span></font>&nbsp;</div>
  <div><font size="2"><span class="374435100-09032006"><font
 color="#0000ff">All 3 of these attemps results in the eInvalid
exception gettting raised by manage_pasteObjects( ). req['__cp'] is a
reference to the cookie that gets set when you place something on the
clipboard. I was trying to grab a specific piece of the REQUEST instead
of the whole thing. Does context.manage_pasteObjects(context.REQUEST)
need to be written as:
context.manage_pasteObjects(REQUEST=context.REQUEST)?</font></span></font></div>
  <div><font size="2"><span class="374435100-09032006"></span></font>&nbsp;</div>
  <div><font size="2"><span class="374435100-09032006"><font
 color="#0000ff">It's kind of a moot point now anyway. I'm using some
SESSION variables now to store the ids of te objects I want to cut and
the path of their container so I can do the cut and paste from a single
script. Not sure if this is good or not but it's working for me now.
It's one of those times when I just need something to work.</font></span></font></div>
  <div><font size="2"><span class="374435100-09032006"></span></font>&nbsp;</div>
  <div><font size="2"><span class="374435100-09032006"><font
 color="#0000ff">-Tom</font>&nbsp;</span></font></div>
  <div><font size="2"><br>
  </font></div>
  <div align="left" dir="ltr"><br>
  </div>
  <div class="OutlookMessageHeader" align="left" dir="ltr" lang="en-us">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b></b></font></div>
  <br>
</blockquote>
Hi Tom,<br>
<br>
I'm glad you found 'another way' but in the interest of no one I wish
to add the following.<br>
<br>
These methods:&nbsp; manage_copyObjects, manage_cutObjects and
manage_pasteObjects should be reviewed in /OFS/CopySupport.py - because
the current docs do not describe them well.<br>
<br>
For example, the copy method works differently depending on whether you
just pass the container's Ids or pass the Ids *and* the REQUEST.<br>
<br>
No reason to beat a dead horse&nbsp; but of the 3 tries you listed only the
first can (but conditionally) work:<br>
<br>
context.manage_pasteObjects(context.REQUEST) <br>
<br>
But *only* if you first called manage_copyObjects (or manage_cutObject)
with the REQUEST as a parameter included .... (only then does REQUEST
get the __cp object)<br>
<br>
Your second try:<br>
<font><span class="374435100-09032006"></span></font><br>
<font><span class="374435100-09032006"><font size="2"><big>context.manage_pasteObjects(context.cb_dataItems())</big></font></span></font><br>
<font><span class="374435100-09032006"></span></font><br>
<font><span class="374435100-09032006"><font size="2"><big>Is wrong
because it is passing a list of items in the clip board instead of the
the encoded copy object (returned by manage_copyObjects) that
"manage_pasteObjects" expects</big></font></span></font><br>
<font><span class="374435100-09032006"></span></font><br>
<font><span class="374435100-09032006"><font size="2"><big>Your last
try is wrong because both parameters are incorrect.</big></font></span></font>
:-)<font><span class="374435100-09032006"></span></font><br>
<font><span class="374435100-09032006"><font size="2"><big><br>
All best,</big></font></span></font><br>
<font><span class="374435100-09032006"></span></font><br>
<font><span class="374435100-09032006"><font size="2"><big>David</big></font></span></font><br>
<font><span class="374435100-09032006"></span></font><br>
<font><span class="374435100-09032006"></span></font><br>
<br>
<br>
</body>
</html>