You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by André Faria <an...@mandic.com.br> on 2007/05/07 13:00:28 UTC

Problems with number convertion on s:input

Hi All,

    I have the follow problem:
    I am using the Portuguese Brazil Localization on Struts 2, so the 
format to decimal numbers is (1.000.000,00) equals (1,000,000.00) in 
american localization.
    If you fill the s:input fields with the brazilian format, the struts 
converts the numbers in the correct way to a double number, but  when 
the struts reads the double field, it apparently only makes an toString 
call, and it prints an unformated output. What can I do to solve this 
problem?

   
Have a nice  day!

Thank's,
André Faria



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems with number convertion on s:input

Posted by André Faria <an...@mandic.com.br>.
I resolved that from this way:

<s:textfield name="cliente.salario" label="Salário" 
value="%{getText('format.number',{cliente.salario})}"/><br/>

Thank's
André Faria
André Faria escreveu:
> The problem occurs from the action to view.....
> from the view to action its ok....
>
> Please I anyone can help...
>
> Thank's a lot
>
> André Faria escreveu:
>> Hi All,
>>
>>    I have the follow problem:
>>    I am using the Portuguese Brazil Localization on Struts 2, so the 
>> format to decimal numbers is (1.000.000,00) equals (1,000,000.00) in 
>> american localization.
>>    If you fill the s:input fields with the brazilian format, the 
>> struts converts the numbers in the correct way to a double number, 
>> but  when the struts reads the double field, it apparently only makes 
>> an toString call, and it prints an unformated output. What can I do 
>> to solve this problem?
>>
>>   Have a nice  day!
>>
>> Thank's,
>> André Faria 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Problems with number convertion on s:input

Posted by André Faria <an...@mandic.com.br>.
The problem occurs from the action to view.....
from the view to action its ok....

Please I anyone can help...

Thank's a lot

André Faria escreveu:
> Hi All,
>
>    I have the follow problem:
>    I am using the Portuguese Brazil Localization on Struts 2, so the 
> format to decimal numbers is (1.000.000,00) equals (1,000,000.00) in 
> american localization.
>    If you fill the s:input fields with the brazilian format, the 
> struts converts the numbers in the correct way to a double number, 
> but  when the struts reads the double field, it apparently only makes 
> an toString call, and it prints an unformated output. What can I do to 
> solve this problem?
>
>   Have a nice  day!
>
> Thank's,
> André Faria

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org