[Webwork-devel] Handling dates in webwork
Brought to you by:
baldree,
rickardoberg
From: Patrick L. <pli...@ho...> - 2002-06-18 20:29:18
|
Can someone tell me how/if date handling is possible like so: public FooAction extends ActionSupport { public Date getSomeDate() { .. } public void setSomeDate(Date someDate) { ... } ... } Now I want the date input to be done by using an HTML textfield that uses the format "MM/dd/yyyy". How can I get this string to be automatically converted to a date on input, but also automatically converted back to a string on output/error? Last time I brought this up, setAsText worked great, but getAsText was non-functional. I was told that there were other ways around this (Rickard I believe told me), but then I think the resolution was that the best way to do this was to actually use String as the property value and convert it inside the action. Seems rather ugly to me... Any way that i18n can help here? -Pat |