You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Juan Alvarado <ja...@manduca.com> on 2002/04/15 20:48:50 UTC

Message Resources question

Hi I need to be able to accomplish the following:

<bean:message key='banneradtag' arg0='???' />

The part above with the ??? needs to be retrieved also from my message
resources. So what I need to do is something like:

<bean:message key='banneradtag' arg0='<bean:message
key='<%=article.getChannel()%>'/>' />

The key is retrieved from a property in a bean thus:
<%=article.getChannel()%>

Can anyone tell me if there's a way to accomplish the above.

Thanks in advance

**********************************************
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
jalvarado@manduca.com
AOL Instant Messenger: juan2000@aol.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Message Resources question

Posted by "Enrique M. Almonte" <ea...@datapromiami.com>.
Hi, maybe you can set your key in the action that calls your JSP,

MessageResources msgres = getMessageResources();
String key = msgres.getMessage(article.getChannel());
session.setAttribute("key",key); //or request

JSP :
String key = (String) session.getAttribute("key");
<bean:message key='banneradtag' arg0='<%=key %> />

Greetings / Saludos

Enrique Almonte
DATAPRO Inc.


----- Original Message -----
From: "Juan Alvarado" <ja...@manduca.com>
To: "Struts" <st...@jakarta.apache.org>
Sent: Monday, April 15, 2002 11:48 AM
Subject: Message Resources question


> Hi I need to be able to accomplish the following:
>
> <bean:message key='banneradtag' arg0='???' />
>
> The part above with the ??? needs to be retrieved also from my message
> resources. So what I need to do is something like:
>
> <bean:message key='banneradtag' arg0='<bean:message
> key='<%=article.getChannel()%>'/>' />
>
> The key is retrieved from a property in a bean thus:
> <%=article.getChannel()%>
>
> Can anyone tell me if there's a way to accomplish the above.
>
> Thanks in advance
>
> **********************************************
> Juan Alvarado
> Internet Developer -- Manduca Management
> (786)552-0504
> jalvarado@manduca.com
> AOL Instant Messenger: juan2000@aol.com
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>