struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Bockermann <ch...@dorf.de>
Subject Using date to format a date
Date Thu, 15 Oct 2009 20:03:44 GMT
Hi list!

I want to display a date in a user-specified manner (struts2 web-app)
Thus, there exists a form where users can specify date-format strings,  
I validate them
and on another page, I want to use the date-tag to display the date in  
the choosen format.

So I have a session-property "date-format", accessible with

	<s:property value="#session.date-format" />

and would like to use this format property, something like

	<s:date name="date" format="#session.date-format" />

Unfortunately the date-tag does not allow expressions in its 'format'  
attribute. Any
way around? Or is this simply not the right way to solve such a thing?

Best regards,

    Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message