HI!
I´m not sre what you mean... but....
StringUtils is not  an abstract class, so you could put in the context of 
Velocity an instance of StringUtils....
velContext.put("StringUtils", new StringUtils() );
In your template...
 
$StringUtils.leftPad( $car.id, 6, '0') $StringUtils.leftPad( $car.na000me, 15, 
' ')
 
wish it helps...
 
Lucas
 


Vinicius Caldeira Carvalho <[EMAIL PROTECTED]> escribió:
Sorry for the OT. But since they're kinda related ...
Does velocity provides a way to fill gaps on my variables? Translating...
I have a pojo car, which has ID and Name Id must have size 6 with zero
left padd, and Name 15 with with white spaces padding. Now let's suppose
I have:

Car beetle = new Car(1,"beetle");
When printing:
$car.id $car.name
I get
1 beetle
When the desirable would be:
00001 beetle

This is for reporting purposes

Thanks all



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

Reply via email to