You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rubens <ru...@hotmail.com> on 2008/06/04 08:26:36 UTC

S2 Refering to another key in the Resource Bundle?

Does Struts 2 resource bundle support refering to previously defined
parameter keys in the resources file?

For example, something like this:

software.version=1.0.1
software.text=Software version is ${software.version}

<s:text name="software.text" /> prints
Software version is 1.0.1

I know I can use the {0}, {1}, ...{n} tokens and pass use
<s:param>...</s:param> with <s:text>...</s:text>.  However, I have cases
where this is not possible to do.

Thanks.

Rubens.
-- 
View this message in context: http://www.nabble.com/S2-Refering-to-another-key-in-the-Resource-Bundle--tp17640036p17640036.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: S2 Refering to another key in the Resource Bundle?

Posted by Maxx <ma...@gmail.com>.
On Wed, Jun 4, 2008 at 8:26 AM, Rubens <ru...@hotmail.com> wrote:
>
> Does Struts 2 resource bundle support refering to previously defined
> parameter keys in the resources file?
>
> For example, something like this:
>
> software.version=1.0.1
> software.text=Software version is ${software.version}
>
> <s:text name="software.text" /> prints
> Software version is 1.0.1
>
> I know I can use the {0}, {1}, ...{n} tokens and pass use
> <s:param>...</s:param> with <s:text>...</s:text>.  However, I have cases
> where this is not possible to do.

AFAIK, it's not working the way you excepted it to be, because this
resource bundle system is provided by the Java Properties class.

see: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html

Maxx

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