velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Friedrich Bergmann" <bergm...@ananzi.co.za>
Subject methods are overseen
Date Thu, 22 Aug 2002 11:01:55 GMT
hello velocity world,

i have just started trying to use velocity in a
professional context.
everything seems to be fine, for one simple, fatal,
horrible problem:

velocity does not call the functions of the classes i put
into the Context.

simple values are fine, and overriding the toString()
function of the class that otherwise fails also works.

i have tried everything, now i need HELP. why is this not
working!?

details:

class VeloXML {
   public VeloXML(){}
  
   public String Na="nu";
   public String getNa(){
      return Na;
   }
   
   public void setNa(String val){
      Na=val;
   }
    
   public String toString(){
       return "hoho";
   }  

...
   context.put("nana",this);
...
}


THE TEMPLATE
  ${nana}
  ${nana.Na}
  $nana.Na
  ${nana.Na()}
  ${nana.getNa()}
  ${nana.getNa}
GENERATES
  hoho
  ${nana.Na}
  $nana.Na
  ${nana.Na()}
  ${nana.getNa()}
  ${nana.getNa}

so only the toString() function works.
this cannot be right.

thanks in advance,
friedrich
 
==
Find businesses and have your business found: http://www.brabys.com

--
To unsubscribe, e-mail:   <mailto:velocity-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-dev-help@jakarta.apache.org>


Mime
View raw message