The JSTL format tags are always a viable option as well.

-Rod

-----Original Message-----
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 23, 2007 18:31
To: Struts Users Mailing List
Subject: Re: [S2] Formatting inside Iterator tag

if you can somehow cast to bean you can use bean:write (with format option)
//assuming this starts off as  a hashtable
<logic:iterate id="element" name="myhashtable">
Next element is <bean:write name="element" property="value" format="#.00"/>
</logic:iterate>
http://www.servlets.com/archive/servlet/ReadMsg?msgId=361774&listName=struts
-dev
link courtesy of Martin Cooper

Anyone?
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Mark Menard" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Monday, April 23, 2007 5:44 PM
Subject: Re: [S2] Formatting inside Iterator tag


> On 4/23/07 5:37 PM, "chengas123" <[EMAIL PROTECTED]> wrote:
>
>>
>> I am using the iterator tag as follows:
>>           <s:iterator value="orders" status="status" id="order">
>>             <tr>
>>               <td><s:property value="orderid" /></td>
>>               <td><s:property value="orderDate" /></td>
>>               <td><s:property value="total" /></td>
>>             </tr>
>>           </s:iterator>
>>
>> This will give me an order date such as "20040513" and a total such as
>> "68.7700" when what I really want is 05/13/2004 and $68.77.  I have not 
>> been
>> able to figure out how to do this.  Any recommendations?
>
> <s:text name="format.date"><s:param name="value" value="orderDate"
> /></s:text>
>
> That will do the date, there are some other formats listed on the Wiki I
> think. *shrug*
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to