You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Thomas Kjeldahl Nilsson <tn...@marcello.no> on 2004/07/26 16:13:00 UTC

Accessing an objects static variables from templates?

Hello all,

quick question: is there a problem (or some alternate way) with 
accessing a given objects static variables from jxtemplates?

Let's say I have 'MyClass' instantiated as 'myObject', and 'myObject' is 
set as an attribute of the session.



public class MyClass(){

   public static final String myVariable = "something!";

   public void myStuff(){}

}



In one of my templates I try to show myVariable: 
${cocoon.session.myObject.myVariable}. No resulting output.
Calling ${cocoon.session.myObject.myStuff()} works, though.

So my question is, how is accessing a variable different from calling a 
method- what makes the jx generator go bonk here?


--
Thomas Kjeldahl Nilsson
Oslo, Norway

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org