You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by J&M <ca...@yahoo.com> on 2007/08/20 18:11:56 UTC

ognl, url and text

Greetings,

I want to get the text of an url from a resource bundle. I have the
following test snippet from a jsp:

<s:text name="anon.page.home.banner" id="test1"/>

<ol>     
    <li>test: <s:url value="%{text('anon.page.home.banner')}"/></li>
    <li>test: <s:url value="%{test1}"/></li>
</ol>

What I get on the output is something like this:

1. test:
2. test: /images/en/flash/intro.swf

Can anyone explain why the first version does not work? I get the basic idea
from
http://struts.apache.org/2.0.9/docs/i18n.html

Cheers
-- 
View this message in context: http://www.nabble.com/ognl%2C-url-and-text-tf4299860.html#a12238826
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: ognl, url and text

Posted by J&M <ca...@yahoo.com>.
Sorted. Thanks Rene for the help.



Rene Gielen wrote:
> 
> <s:url value="%{getText('anon.page.home.banner')}"/>
> should do the trick.
> 
> J&M schrieb:
>> Greetings,
>> 
>> I want to get the text of an url from a resource bundle. I have the
>> following test snippet from a jsp:
>> 
>> <s:text name="anon.page.home.banner" id="test1"/>
>> 
>> <ol>     
>>     <li>test: <s:url value="%{text('anon.page.home.banner')}"/></li>
>>     <li>test: <s:url value="%{test1}"/></li>
>> </ol>
>> 
>> What I get on the output is something like this:
>> 
>> 1. test:
>> 2. test: /images/en/flash/intro.swf
>> 
>> Can anyone explain why the first version does not work? I get the basic
>> idea
>> from
>> http://struts.apache.org/2.0.9/docs/i18n.html
>> 
>> Cheers
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/ognl%2C-url-and-text-tf4299860.html#a12321575
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: ognl, url and text

Posted by Rene Gielen <gi...@it-neering.net>.
<s:url value="%{getText('anon.page.home.banner')}"/>
should do the trick.

J&M schrieb:
> Greetings,
> 
> I want to get the text of an url from a resource bundle. I have the
> following test snippet from a jsp:
> 
> <s:text name="anon.page.home.banner" id="test1"/>
> 
> <ol>     
>     <li>test: <s:url value="%{text('anon.page.home.banner')}"/></li>
>     <li>test: <s:url value="%{test1}"/></li>
> </ol>
> 
> What I get on the output is something like this:
> 
> 1. test:
> 2. test: /images/en/flash/intro.swf
> 
> Can anyone explain why the first version does not work? I get the basic idea
> from
> http://struts.apache.org/2.0.9/docs/i18n.html
> 
> Cheers

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