You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sam Bilbrey <sb...@resource.com> on 2004/07/21 22:30:44 UTC

Using .properties file to set elements in
I hope this is not to much of a newbie question:
 
I would like to do something like:
 
<html:text property="firstName" maxLength="<bean:message
key="name.field.maxLength"/>"/>
 
Any suggestions would be greatly appreciated.
 
Sam Bilbrey
sbilbrey@yahoo.com
 


Re: Using .properties file to set elements in Posted by ron1 <ro...@gmx.net>.
I never used struts EL but I cuess you can do it with it:

<bean:define id="length"><bean:message key="length.key"></...>

<html:text property"..." maxLength="${length}"/>

I am not sure about the String -> int conversion, since bean length is a 
String, ant the attribute excepts an int, but maybe it works :-)



Sam Bilbrey wrote:
> I hope this is not to much of a newbie question:
>  
> I would like to do something like:
>  
> <html:text property="firstName" maxLength="<bean:message
> key="name.field.maxLength"/>"/>
>  
> Any suggestions would be greatly appreciated.
>  
> Sam Bilbrey
> sbilbrey@yahoo.com
>  
> 
> 


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