But that's more code than the brute force approach: <input name="usage" value="<bean:write name="Obj" property="usage" format="##"/>" />
If have about 20-30 items. :o( > -----Ursprüngliche Nachricht----- > Von: Lance [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 16. April 2007 11:05 > An: Struts Users Mailing List > Betreff: Re: AW: HowTo Format Numbers in html:text tag? > > You could combine with struts-el > > <!-- store in formattedNumber (don't output --> > <fmt:formatDate value="${myForm.myNumber}" pattern="??" > var="formattedNumber" /> > > <!-- use the formatted value --> > <html-el:text property="myNumber" value="${formattedNumber}" /> > > Peter Neu wrote: > > That looks cool but I need to embed the value in the html:text field so > the > > user is able to edit the value. That won't work with 2 tags. :o( > > > > > >> -----Ursprüngliche Nachricht----- > >> Von: Lance [mailto:[EMAIL PROTECTED] > >> Gesendet: Montag, 16. April 2007 10:45 > >> An: Struts Users Mailing List > >> Betreff: Re: HowTo Format Numbers in html:text tag? > >> > >> You could use <fmt:formatDate /> in JSTL > >> http://bellsouthpwp.net/b/i/billsigg/jstl-quick-reference.pdf > >> <http://bellsouthpwp.net/b/i/billsigg/jstl-quick-reference.pdf> > >> > >> Peter Neu wrote: > >> > >>> Hello, > >>> > >>> I need to format a number string in a html:text tag because the > default > >>> value must be written with a comma sperator. e.g. 4,5 while the value > of > >>> > >> my > >> > >>> value bean is in fact like this: 4.5. > >>> > >>> Normally I would use bean:message and the format attribute. But this > >>> > >> does > >> > >>> not work in html:text. > >>> > >>> How can I do this? > >>> > >>> > >>> Cheers, > >>> Pete > >>> > >>> > >>> > >>> > >>> --------------------------------------------------------------------- > >>> 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] > >> > > > > > > > > --------------------------------------------------------------------- > > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]