cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Kjeldahl Nilsson>
Subject Accessing an objects static variables from templates?
Date Mon, 26 Jul 2004 14:13:00 GMT
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:
For additional commands, e-mail:

View raw message