struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moacir Cardoso <moac...@yahoo.com.br>
Subject Re: Problems with Number Format
Date Fri, 02 Nov 2007 14:46:04 GMT
Hi everyone,
I've found the source off my problem.
It seams that if you want to format a value in s:textfield tag you have to:

<s:text id="myFieldValueID" name="format.number"><s:param name="value" 
value="myFieldValue" /></s:text>
<s:textfield id="txtmyFieldValue" name="myFieldValue" 
value="%{myFieldValueID}"/>

The magic trick is the id attribute of s:text tag.

But will have some problems if I don't initialize myFieldValue in the 
default constructor of my action and I don't know why.


Moacir Cardoso escreveu:
> Hello,
> I want to show in my textfield control a formated value.
>
> In my globalMessages.properties I've this
> format.number={0,number,###,##0.00}
>
> This code works fine
> <s:text name="format.number"><s:param name="value" 
> value="myFieldValue" /></s:text>
>
> But can't use it with a <s:textfield name="myFieldValue" 
> id="myFieldValue" label="myFieldValue:"/> and apply the format to it.
>
> ?????? help!!!
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>


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


Mime
View raw message