http://www.rpsenterprises.com/struts/index.html

-----Original Message-----
From: Krueger, Jeff [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 11:04 AM
To: '[EMAIL PROTECTED]'
Subject: Formatting a float for display


All,
    My guess is there is some easy way to do this.  I have a formBean that
has a get and a set for a value that is a float.  I want to display this
float in a format of #,###.##.  I am using java.text.DecimalFormat and that
works pretty good except it returns a String.  So if I change my get and set
to return a String then I will have to convert that back in my action class
to a float and Float.parse("#,###.##") will throw a format exception.  So I
am wondering if there is any utils or good practices to have your formBean
display a float with formatting and then get that value back in the action
class in a float data type.

Thanks

Jeff Krueger



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



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

Reply via email to