Hi,

Your methods takes XWikiDocument bug $xwiki.getDocument() return
Document (it's a public/velocity api to acces XWikiDocument) so you
are calling movePageAndChildren with XWikiContext, Document, String.

2008/1/23, Raffaele Viola <[EMAIL PROTECTED]>:
> Hi all,
>
> I try to develop a plugin with two methods:
>
> public String echo(String echoString)
> public boolean movePageAndChildren(XWikiContext context,
> XWikiDocument doc,String space)
>  I'm trying to use it witk this code:
>
> #set($targetspace = $request.targetspace)
>  #set($targetdoc = $request.targetdoc)
>
>  #if($targetdoc and $targetspace)
>      #set($tDoc=$xwiki.getDocument($targetdoc))
>     $xwiki.pagemanager.echo($targetspace)
>
> $xwiki.pagemanager.movePageAndChildren($context.context,$tDoc,$targetspace)
> #end
>
>  <form action="">
>  <table>
> <tr><td>Target Document:</td>
>  <td><input type="text" name="targetdoc" value="$!request.targetdoc"
> size="60"/></td></tr>
> <tr><td>Target Space:</td>
>  <td><input type="text" name="targetspace" value="$!request.targetspace"
> size="60" /></td></tr>
> <tr><td><input type="submit" value="Copy" />
> </td></tr>
>  </table>
> </form>
>
> but when I execute it it seems that the movePageAndChildren method is not
> executed because I get this output:
>
> prova space2
> $xwiki.pagemanager.movePageAndChildren($context.context,$tDoc,$targetspace)
>
> with this input
>
> Target Document=space1.prova
>  Target Space=space2Thanks
> Raffo
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
>


-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to