struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JC Oosthuizen <jc.oosthui...@gmail.com>
Subject Datetimepicker conversion problem
Date Fri, 15 Aug 2008 09:55:07 GMT

Hi All,

I am using a datetimepicker on my jsp. The field containing the date is of
type org.joda.time.DateTime. Struts does not know how to convert DateTime to
and from Strings so I created my own Converter and it works fine when I use
a textfield, but gives me a ParseException when using a datetimepicker.

The tag in my jsp looks as follows:
<s:datetimepicker cssClass="text medium" name="miniSub.installDate"
label="%{getText('miniSub.installDate')}"
displayFormat="%{getText('date.format')}"/>

When the page gets rendered the converter is called and the DateTime is
converted to a string, but that string is not used by the datetimepicker.
This causes a ParseException to occur.

How can I tell the datetimepicker to not try and convert the data on its own
but to use the registered converter to convert the data.

Regards,
JC Oosthuizen
-- 
View this message in context: http://www.nabble.com/Datetimepicker-conversion-problem-tp18996354p18996354.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message