struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Neu" <peter....@gmx.net>
Subject AW: AW: HowTo Format Numbers in html:text tag?
Date Mon, 16 Apr 2007 09:12:12 GMT
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:lance.semmens@marketpipe.com]
> 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:lance.semmens@marketpipe.com]
> >> 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: 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
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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



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


Mime
View raw message