RE: Double formating in html:text boxes

2004-02-12 Thread Slattery, Tim - BLS
> So you would suggest formating the number after it is copied into my 
> form bean?  It is a string at this point.

Anything that's collected from the page has to be a string. If you're goihng
to display a number, not collect it, I'd leave it in numeric format in the
bean and use a JSTL tag to format it:




--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Double formating in html:text boxes

2004-02-12 Thread Nathan Maves
So you would suggest formating the number after it is copied into my 
form bean?  It is a string at this point.

Nathan Maves
Sun Microsystems
On Feb 12, 2004, at 10:28 AM, Larry Meadors wrote:

A few dozen, yes. :)

Look at the java.text.NumberFormat class.

Larry

[EMAIL PROTECTED] 02/12/04 10:18 AM >>>
In my business logic I return a java.util.List to my action.  In this
action I run through the list and use the BeanUtils.copyProperties() to
convert the List elements into formbeans.  The problem is that in the
business object the property "actual" is a Double and in the formBean
it is a string.  This leads me to have text fields with 1.4779002E7 as
the value.  I there any way to get around this?
Nathan Maves
Sun Microsystems


-
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]

Re: Double formating in html:text boxes

2004-02-12 Thread Larry Meadors
A few dozen, yes. :)

Look at the java.text.NumberFormat class.

Larry

>>> [EMAIL PROTECTED] 02/12/04 10:18 AM >>>
In my business logic I return a java.util.List to my action.  In this 
action I run through the list and use the BeanUtils.copyProperties() to 
convert the List elements into formbeans.  The problem is that in the 
business object the property "actual" is a Double and in the formBean 
it is a string.  This leads me to have text fields with 1.4779002E7 as 
the value.  I there any way to get around this?


Nathan Maves
Sun Microsystems




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



Double formating in html:text boxes

2004-02-12 Thread Nathan Maves
In my business logic I return a java.util.List to my action.  In this 
action I run through the list and use the BeanUtils.copyProperties() to 
convert the List elements into formbeans.  The problem is that in the 
business object the property "actual" is a Double and in the formBean 
it is a string.  This leads me to have text fields with 1.4779002E7 as 
the value.  I there any way to get around this?

Nathan Maves
Sun Microsystems

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