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 #* */

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

thanks i really need to developp this plugin

-- 
View this message in context: 
http://n2.nabble.com/HelloWorld-Class-tp2574406p2574445.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.

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

Reply via email to