You can call a static method using the OGNL syntax.
<s:property value="@[EMAIL PROTECTED](myDate)" />.
(More info can be found here
http://www.opensymphony.com/ognl/html/LanguageGuide/)
However i suggest you have a look at the s:date tag.
max
mleneveut wrote:
Hi all,
I just give up the datetimepicker component, due to a 2s more page load
time. I put anoter JS calendar (YUI calendar), but the problem is that in my
Actions I have java.util.Date attributes. So I need to format my Date into a
String that the calendar will understand (dd/MM/yyyy in my case). When I
submit the form I have no problem, Struts converts the dd/MM/yyyy String
into a java.util.Date.
So my question is : How to apply a Java method on a ${myDate} in the JSP ?
Without Struts I would have done :
<% Date myDate = (Date)request.getAttribute("myDate");%>
<%=com.myorg.util.DateManipulation.format(myDate)%>
Or another question : What is the best (most beautiful) way to format all
java.util.Date to dd/MM/yyyy String from Actions to JSP ? Interceptor ?
Overide Struts Converters ? The point is that I will need localization.
Thanks for your help.
Michaƫl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]