struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas De Loof" <nicolas.del...@cgey.com>
Subject Re: dynamic arg0 in bean:message?
Date Mon, 29 Dec 2003 13:17:22 GMT
Your first example is invalid :

<bean:message key="error.minCharacters"
   arg0="<bean:write name="globals" property="minChars" />" />

A JSP tag cannot be used as attribute value of another tag (XML syntax)

This should work :

<bean:define id="minChars" name="globals" property="minChars" type="String"/>
<bean:message key="error.minCharacters"  arg0="<%=minChars%>" />

Nico.


----- Original Message ----- 
From: "Domingo A. Rodriguez S." <domingorodriguez@yahoo.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Monday, December 29, 2003 1:48 PM
Subject: Re: dynamic arg0 in bean:message?


>
> Either escape the double quotes ("<bean:write name=\"globals\"
> property=\"minChars\" />" ) or use single quotes ("<bean:write
> name='globals' property='minChars' />" ).
>
>  --- Frank Maritato <frank.maritato@overture.com> escribió: > Hi,
> >
> > What I want to do is something like this:
> >
> > <bean:message key="error.minCharacters"
> >   arg0="<bean:write name="globals" property="minChars" />" />
> >
> > or
> >
> > <bean:message key="error.minCharacters"
> >   arg0="<%=minChars%>" />
> >
> > Where arg0 is the result of a bean property, but I can't seem to get it
> > to work. If I hard-code the value
> >
> > <bean:message key="error.minCharacters" arg0="20" />
> >
> > It works, but it kinda defeats the purpose.
> >
> > What am I doing wrong, or is there a better way to accomplish this?
> >
> > Thanks
> > --
> > Frank
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
> _________________________________________________________
> Do You Yahoo!?
> Información de Estados Unidos y América Latina, en Yahoo! Noticias.
> Visítanos en http://noticias.espanol.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


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


Mime
View raw message