struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lloyd Wilson" <Lloyd.Wil...@pwgsc.gc.ca>
Subject RE: tiles attribute as message key?
Date Wed, 09 Jul 2003 22:28:51 GMT
I've had a similar problem and the only way i've been able to resolve it is to do something
like the following:

<tiles:useAttribute name="browserSubtitle" />
<bean:message key="<% browserSubtitle.toString () %>" />

That should work as i'm doing something very similar. 

HTH,

Cheers,
Lloyd Wilson

-----Original Message-----
From: Adam Hardy [mailto:ahardy.struts@cyberspaceroad.com]
Sent: Wednesday, July 09, 2003 6:16 PM
To: Struts Users Mailing List
Subject: tiles attribute as message key?


I saw a few posts about this in the list archives. Couldn't find a 
definitive answer.

What I am doing at the moment is this:

<tiles:useAttribute name="browserSubtitle" />
<bean:message name="browserSubtitle"/>

to get the tiles attribute into my bean:message key.

I started out just doing this:

<bean:message key="<tiles:getAsString name="browserSubtitle" />"/>

because the key attribute of bean:message is RT

However this only worked for about 1/2 hour. I then thought, great, I'll 
use this technique everywhere. I changed something and it stopped 
working. So is it not meant to work, or am I doing it wrong?

I also thought there might be a way of accessing the tiles context 
directly from the bean:message like this:<head>

<bean:message name="Context" property="browserSubtitle"/>

or is that nothing like that going to work?

thanks
Adam


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