struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@attws.com>
Subject RE: Can " format strings" be used with html:text input fields
Date Tue, 29 Oct 2002 22:34:32 GMT
Just thinking out loud, for future's sake, but would it be useful if the
"input" tags could optionally take their value from the body content?  If
"value" was set, it would use that, but if not set, it would use the body
content.  That would allow something like this:

<html:text property="LHO_AppraisedPrice">
 <bean:write property="LHO_AppraisedPrice" format="$###,###,###.00" />
</html:text>

It looks a little silly because of the repeated property value, but it
allows you to use the full functionality of "html:text".

> -----Original Message-----
> From: James Mitchell [mailto:jmitchtx@telocity.com]
> Sent: Tuesday, October 29, 2002 2:24 PM
> To: Struts Users Mailing List
> Subject: RE: Can " format strings" be used with html:text input fields
> 
> 
> 
> Here's a quick work-around:
> 
> <input type="text" name="LHO_AppraisedPrice" value="<bean:write
> name="overviewForm"
>             property="LHO_AppraisedPrice"
>             format="$###,###,###.00" />">
> 
> 
> James Mitchell
> Software Engineer/Struts Evangelist
> http://www.open-tools.org
> 
> "Only two things are infinite, the universe and human 
> stupidity, and I'm not
> sure about the former."
> - Albert Einstein (1879-1955)
> 
> 
> > -----Original Message-----
> > From: Norman Klein [mailto:norman.klein@first-franklin.com]
> > Sent: Tuesday, October 29, 2002 2:57 PM
> > To: 'struts-user@jakarta.apache.org'
> > Subject: Can " format strings" be used with html:text input fields
> >
> >
> >
> > Currently we use "format strings" to control the display 
> output of our
> > financial fields for bean:write output statements.
> >
> > 	bean:write name="overviewForm" property="LHO_AppraisedPrice"
> > format="$###,###,###.00" />
> >
> > This "format string" ensures that thousands and hundred 
> thousands values
> > automatically have the appropriate number of commas 
> inserted and that the
> > value ends with ".00". Is there a similiar clean way to do this with
> > "<html:text" fields. It won't recognize a "format" 
> attribute and I would
> > prefer to keep all formatting in the JSP file and out of 
> the corresponding
> > action.
> > ex.
> > 	<html:text property="LHO_AppraisedPrice" />
> >
> > Thanks, Norman
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:struts-user-help@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>

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


Mime
View raw message