sometimes i want to write some java code in
Velocity,not in the portlet code,for example,
i got a object 'java.util.Date',and now i want
to get formatted date string from this object,

in java code,i can
.......
  java.text.SimpleDateFormat sdf = new 
      java.text.SimpleDateFormat("yyyy-MM-dd");
  String s = sdf.format(date);
.......

in velocity, how can i do for $sdf.format($date)?
where can i get $sdf, do i have to init a new object
in portlet code and then put it into the context of
jetspeed?
   that mean i must do such thing in Module part of 
MVC if i adopt Turbine/Jetspeed/Velocity.
 
but i think  the object ,SimpleDateFormat should be
initialized in Velocity,not in the java code of
Portlet.so i can make my code of Module simple.

maybe i dont master the MVC :(:)

any help would be appreciated!











__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

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

Reply via email to