bilobag wrote:
I have a collection of XMLGregorianCalendar objects that I would like to
display on a jsp page as a formatted date. So far I have tried creating my
own converter class to convert XMLGregorianCalendar to java.util.Date, but I
can't seem to get it called properly. What is the best way to get this list
to display on a jsp page as formatted dates? I didn't see much
documentation on how to create a converter to convert from one object type
to another. Another option is for me to be able to call the
XMLGregorianCalendar methods on the jsp page like below, but that didn't
seem to work either. Anybody know the answer?
<s:iterator value="scheduleList" status="scheduleStatus">
<s:date value="scheduleList.toGregorianCalendar().getTime()"
format="dd/MM/yyyy"/>
</s:iterator>
The type conversion stuff is for forms, not display, AFAIK.
If you're iterating over a list then wouldn't you want to call the
conversion thing on each object of the iteration rather than on the list
itself? (I don't know what your list class looks like, so I could be
totally wrong.)
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org