I am using freemarker (jsp should be similar)
<@s.text name="dateTime"
value=actionBean.customeDateTimeString(actionBean.dateTime/>
does not work. I created a method in bean, getCustomDateTimeString() to
generate the special string.
BTW, I am trying to go the route of creating a custom DateFormatter.
How can I reference the action bean/context from within the formatter?
Thanks
----- Original Message -----
From: "Anthony DePalma" <[email protected]>
To: "Stripes Users List" <[email protected]>
Sent: Monday, November 14, 2011 8:22:14 AM
Subject: Re: [Stripes-users] Two way type conversion possible?
Well that wouldn't really make sense seeing as validation is only converting
from a request string to an object. once you have the object, its the jsp that
needs it formatted differently.
At that point you have the object in your action bean and you want to display
it a certain way. you have a bunch of options now. you can create a getter that
does the formatting manually and call that from the jsp. you can use a jsp tag
to convert it ( most useful if you want certain dates to display differently).
or if you are using the object as a form parameter, you can register the type
converter for the class and that's where the auto conversion happens. but now
you are limited in that all dates are formatted this way.
In the end if its just for display, a fmt tag is the best route because you can
use different formats wherever you want. Id argue that's the jsps
responsibility anyway.
On Nov 14, 2011 8:13 AM, < [email protected] > wrote:
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users