Asiri Rathnayake wrote:
> Hi
>
> On Thu, Apr 2, 2009 at 4:09 PM, walido <[email protected]> wrote:
>
>>
>> Hi,
>> thanks for your fast answer here's the code of the class
>> (exuse me i don't know how to use the pastebin or tinybin thing)
>>
>> * Groovy Class #* */

Looks like a slash is missing here, it should be:

/* Groovy Class #* */

not 

* Groovy Class #* */

Hope this helps,
Jerome.


>>
>> class groovyClass {
>>
>> def xwiki;
>> def context;
>>
>>  void setObjects(xwiki, context) {
>>    setXWiki(xwiki);
>>    setContext(context);
>>  }
>>
>>  void setXWiki(xwiki) {
>>    this.xwiki = xwiki;
>>  }
>>
>>  void setContext(context) {
>>    this.context = context;
>>  }
>>
>>  String helloWorld() {
>>    return "Hello World";
>>  }
>> }
>>
>> /* *# */
>> and the snippet :
>>
>> #set($groovyObject = $xwiki.parseGroovyFromPage("Groovy.HelloWorldClass"))
>> $groovyObject.setObjects($xwiki, $context)
>> $groovyObject.helloWorld()
>>
>> anyway here's the link to the tutorail that i followed:
>>
>> http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyClassHelloWorldTutorial
>>
>
> Just tried this tutorial and it's working fine.
>
> Did you replace "Groovy.HelloWorldClass" with the page name containing your
> groovy class code?
>
> - Asiri
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs

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

Reply via email to