struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject RE: <bean:message key=<bean:write question
Date Tue, 29 Jul 2003 15:22:25 GMT
--- Brian McSweeney <brian.mcsweeney@aurium.net> wrote:
> Hi David,
> Thanks for the quick reply.
> 
> I know that JSTL might be the best way, but for the moment
> I'd really prefer to just get it working with the struts tags 
> first because it's an entire app using the struts tags.
> 
> If my proposed method isn't valid how about something like:
> 
> <bean:define id=localCopy name="myForm" property="myProperty"
> type="java.lang.String/>
> 
> <bean:message key="<%=localCopy%>"/>

Yuck! How about <fmt:message key="${myForm.myProperty}"/> :-) ?

David

> 
> Perhaps this would work?
> I know it's a bit nasty, but I just want to get it working :-)
> 
> Thanks for your help
> Brian
> 
> 
> 
> -----Original Message-----
> From: David Graham [mailto:grahamdavid1980@yahoo.com] 
> Sent: 29 July 2003 16:04
> To: Struts Users Mailing List
> Subject: Re: <bean:message key=<bean:write question
> 
> --- Brian McSweeney <brian.mcsweeney@aurium.net> wrote:
> > Hi all,
> >  
> > I have parameters in a form bean and I want to use it as 
> > the key for an associated value in a resource bundle.
> >  
> > I was considering using 
> >  
> > <bean:message key=<bean:write name="myForm" property="myProperty">/>
> >  
> > is this valid syntax?
> 
> No.  You can't use a tag as another tag's attribute value.  Have you
> considered using the JSTL's <fmt:message> tag instead?
> 
> David
> 
> >  
> > Thanks,
> >  
> > Brian
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
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