Hi,
I have another problem. I want to use a class that extends a parent class and 
then use parseGroovyFromPage.

But I can't work out how to do it. An example here:

---------------------------------------------------------------------
page ParentObject:

<%

class ParentObject {

def counter = 0;
def session;

  void setSession(session) {
    this.session = session;
  }
}


%>


---------------------------------------------------------------------
page UserClass:

/* Groovy Class #* */



public class User extends ParentObject {

  void setUser() {
    if (session.getValue("counter") != null)
      this.counter = session.getValue("counter") + 1;
    else
      this.counter = 1;

    session.setAttribute("counter", this.counter);
  }

  String showCounter() {
    return this.counter;
  }
}


/* *# */

---------------------------------------------------------------------
script page:

#set ($groovyObject = $xwiki.parseGroovyFromPage("Include.UserClass"))

---------------------------------------------------------------------


The question is how to include the ParentObject page into UserClass page, so 
that UserClass can extend the ParentObject.

Any help would be appreciated.

Thanks, Zik

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to