You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paulo Lima <pa...@yahoo.com> on 2002/10/09 21:15:57 UTC
How to Format a date atribute from a bean object on a jsp page using TAGLIB
Hi !
How can I format a date attribute from a bean that is
available in a jsp page.
For example a have a collection object that I put in
request using setAttribute("polls", polls).
Each collection object is a Poll object that has a
Timestamp attribute.
In jsp file:
I would like to use the jakarta-taglibs-datetime-1.0
format tag that has a date attribute thats "et the
date to format by passing in a Date object using a
runtime expression value.".
I tried to use
<logic:iterate name="polls" id="Poll">
<tr>
<td><bean:write name="Poll" property="id"/></td>
<td><dt:format pattern="MM/dd/yyyy hh:mm"><bean:define
id="startDateBean" name="Poll"
property="startDate"/></dt:format></td>
<td><bean:write name="Poll" property="endDate"/></td>
<td><a
href="/votingradios/resultPoll.do?id=<bean:write
name="Poll" property="id"/>">(<bean:write name="Poll"
property="question"/>)</a></td>
</tr>
</logic:iterate>
If I don�t use the format tag It�s works.
Please, help me !
Regards,
Paulo Lima.
__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>