Hi,
that doesn't work.
xwiki.parseGroovyFromPage("ParentObject") returns an object of the class. I only
need to include the class, so that UserClass can extend it.
Hi
I think you'll need in your User class to use
$xwiki.parseGroovyFromPage("ParentObject")
Before that you need to pass $xwiki to User class.
public class User extends ParentObject {
private xwiki = null;
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;
}
public void setXwiki(xwiki)
{
this.xwiki = xwiki;
}
}
--
View this message in context:
http://n2.nabble.com/Using-session-inside-a-class-tp2502340p2525971.html
Sent from the XWiki- Users mailing list archive at
Nabble.com.