Re: Display GregorianCalendar Objects

2010-07-28 Thread Ken
On Tue, 2010-07-27 at 21:45 +0200, Michal Ciasnocha wrote: > Why don't use Struts tag s:date for date formatting? > > in Action: > > public GregorianCalendar getMyDate() { >return new GregorianCalendar(); > } > > in jsp: > > > > Michal > > > Hi all, > > i do it like that: > > in my

Re: Display GregorianCalendar Objects

2010-07-28 Thread Michal Ciasnocha
In that case you must use own converter like this: public class DateTimeConverter extends StrutsTypeConverter { @Override public Object convertFromString(Map context, String[] values, Class toClass) { try { return DateUtil.getConvertedDate(values[0], DateUt

Re: Display GregorianCalendar Objects

2010-07-28 Thread Reeshi Agrawal
Michal, I wanted the user to input his birth-date. Displaying the current date will be of no use for it.

Re: Display GregorianCalendar Objects

2010-07-27 Thread Michal Ciasnocha
Why don't use Struts tag s:date for date formatting? in Action: public GregorianCalendar getMyDate() { return new GregorianCalendar(); } in jsp: Michal Hi all, i do it like that: in my POJO GregorianCalendar field, on my jsp text field + jquery calendar. If You want to create date i

Re: Display GregorianCalendar Objects

2010-07-27 Thread Paweł Wielgus
Hi all, i do it like that: in my POJO GregorianCalendar field, on my jsp text field + jquery calendar. If You want to create date in some kind of predefined format You can use Conventer for GregorianCalendar for your app. Best greetings, Paweł Wielgus. 2010/7/27 Reeshi Agrawal : > Same problem w

Re: Display GregorianCalendar Objects

2010-07-27 Thread Reeshi Agrawal
Same problem with me... I want (through Struts 2 tags), a way to display date as three adjacent (side-by-side) drop-down menus, one each for date,month and year. Normally what will happen is: the three drop-down menus will be displayed in three separate consecutive rows in the HTML table generated

Display GregorianCalendar Objects

2010-07-27 Thread Ken
This seems like it should be beyond easy yet I still find my self asking... I my POJO has several GregorianCalendar objects. In my JSP what is the best way to display a simple (year, month, day) format? Use Java in the JSP it self? Is there a good struts 2 tag for this... I think if the field we