This is cool, Thanks Lukasz, and it's solved one of two issues for me

But I'm going to be difficult because I'm working with Tiles as well!

Is there any way of doing it without going to the action class?

What I really want to do is use <s:text> in a standard layout jsp used with
Tiles

For example, this works:

    <fmt:bundle basename="global">
        <tiles:importAttribute name="pageTitle" />
        <title><fmt:message key="${pageTitle}" /></title>
    </fmt:bundle>

And I'd very much like to replace it with something like:

    <tiles:importAttribute name="pageTitle" />
    <title><s:text name="%{pageTitle}" /></title>

(which doesn't!!)  I get the feeling there is a missing link between the
tiles attribute and the stack variable, but I can't work out how to put the
tiles attribute on the ognl stack

Cheers

Nick

-----Original Message-----
From: Lukasz Lenart [mailto:[EMAIL PROTECTED] 
Sent: 21 October 2008 14:53
To: Struts Users Mailing List
Subject: Re: Migrating from Struts 1: dynamically loading <s:text name=""/>

> I am looking for a way to dynamically load <s:text
name="somethingDynamic"/>

try
<s:text name="%{somethingDynamic}"/>

and in your action add

String getSomethingDynamic() {
  return "some.key";
}


Regards
-- 
Lukasz
http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to