> Date: Mon, 10 Nov 2014 16:23:33 +0100
> From: [email protected]
> To: [email protected]
> Subject: Re: [xwiki-users] access another document with groovy
> def yourDocReference = new DocumentReference('xwiki', 'XWiki', 'WebHome')
>
> def yourDoc = xwiki.getDocument(yourDocReference)
> def list = yourDoc.getAttachmentList()
I tied it on my xwiki and when I type :
{{groovy}}
def yourDocReference = new DocumentReference('xwiki','XWiki','WebHome');
def yourDoc = xwiki.getDocument(yourDocReference);
list=yourDoc.getAttachmentList();
println(list);
{{/groovy}}
I get this error....
Caused by: javax.script.ScriptException:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1677.groovy: 1: unable to resolve class DocumentReference
@ line 1, column 24.
def yourDocReference = new DocumentReference('xwiki','XWiki','WebHome');
did I miss anything?
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users