xowiki::Page instproc www-clipboard-copy (public)

 <instance of xowiki::Page[i]> www-clipboard-copy

Defined in /var/www/openacs.org/packages/xowiki/tcl/xowiki-www-procs.tcl

This web-callable method copies the content of the clipboard to the current folder. After copying the elements from the clipboard, redirect either to the return_url of the calling page.

Testcases:
No testcase defined.
Source code:
set clipboard [::xowiki::clipboard get]
set item_ids [::xowiki::exporter include_needed_objects $clipboard]
set content [::xowiki::exporter marshall_all -mode copy $item_ids]

ad_try {
  namespace eval ::xo::import $content
} on error {errMsg} {
  :msg "Error: $errMsg\n$::errorInfo"
  return
}
set folder_id [expr {[:is_folder_page] ? ${:item_id} : ${:parent_id}}]
set msg [::${:package_id} import -replace 0 -create_user_ids 1  -parent_id $folder_id -objects $item_ids]
util_user_message -html -message $msg
::xowiki::clipboard clear
:return_redirect_without_params
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: