Never mind was using regular _expression_ formatting, Needed to use format="$###,000.00"
Inactive hide details for [EMAIL PROTECTED][EMAIL PROTECTED]


          [EMAIL PROTECTED]

          07/28/2005 03:58 PM

          Please respond to
          "Struts Users Mailing List" <user@struts.apache.org>

To

user@struts.apache.org

cc


Subject

<bean:write> format

Has Anyone used the format attribute to format currency?

I have a property in an ActionForm which will hold a dollar figure and want
to format when displaying.

ie.


listPrice = 930

Need to Display $930.00


or

listPrice = 1299.9

Needs to Display $1,299.90


I have attempted the following

<bean:write name="myForm" property="listPrice" format="\\$\\d+\\.\\d\\d"/>

but that prints

\$\D+\930.\d\d

not exactly what I was hoping for :)

Reply via email to