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 overseen
Date Thu, 22 Aug 2002 12:50:39 GMT
hello velocity world,

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



==
http://www.zenaptix.co.za
===
http://binarchy.net

please ignore below advertisements
 
==
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