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

Nathan Anderson escreveu:
I believe the Struts 2 recommended practice is to put your number [and currency 
and date/time] formats into your ApplicationResources*.properties files.  Like 
these en_US examples:

format.date = {0,date,MM/dd/yyyy}
format.time = {0,date,MM/dd/yyyy ha}
format.percent = {0,number,##0.00'%'}
format.currency = {0,number,$##0.00}

And then for display you can use a tag like this:

<s:text name="format.date" >
    <s:param value="person.birthDate"/>
</s:text>

I don't have a sample <s:input> in my project, but I imagine it would be 
similar.

----

Speaking of putting the formats into ApplicationResources*.properties files... this seems like a GREAT idea to me. Would other web frameworks used in AppFuse support that? Should we make change AppFuse to store formats that way?
Nathan


----- Original Message -----
From: "André Faria" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, May 7, 2007 5:19:42 AM (GMT-0800) America/Los_Angeles
Subject: [appfuse-user] 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? The problem occurs from the action to view..... from the view to action its ok....

  Have a nice  day!

Thank's,
André Faria

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


--
Atenciosamente,
*/André Faria/*
/Bluesoft Consultoria em Informática/
/Fone: [55 11] 5543-5406/
/e-mail: [EMAIL PROTECTED]/
/Web: www.bluesoft.com.br/
////////

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

Reply via email to