struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gonçalo Luiz" <goncalo.l...@gmail.com>
Subject Re: Use tiles:getAsString to return a key to s:text
Date Sun, 04 Feb 2007 15:41:21 GMT
Hello,

Thank you very much, it indeed worked.

Regards,
Gonçalo Luiz.

On 04/02/07, Djordje Trifunovic <djtrifun@cisco.com> wrote:
> Hi Gonçalo,
>
> Nesting tag as an attribute of another tag is not supported. To accomplish
> this particular task of passing key through tiles, try this instead:
>
>   <tiles:importAttribute name="title" />
>   <s:text name="%{#attr['title']}"/>
>
> Regards,
> Dj.
>
> -----Original Message-----
> From: Gonçalo Luiz [mailto:goncalo.luiz@gmail.com]
> Sent: Saturday, February 03, 2007 7:53 PM
> To: Dave Newton
> Cc: Struts Users Mailing List
> Subject: Re: Use tiles:getAsString to return a key to s:text
>
> Hello Dave,
>
> Thank you for your answer.
>
> However what I want to achieve is a little more than just
> internationalization, what I can do by simply using <s:text
> name="some.key"/>.
>
> What I'm seeking is to put a key in tiles configuration file (usually
> tiles.xml) like:
>
> <put name="title" value="some.key"/>
>
> that gets included in the page by using <tiles:getAsString
> name="title"/>. However by doing just this I get literally "some.key"
> on my pages title. So what I'm tring is to do use that string in a
> <s:text> tag like
>
> <s:text name="<tiles:getAsString name="title">"/> however I'm getting
> one of two problems:
>
> 1 - If i use the above statement I get a "expecting equal symbol" exception
> 2 - if I use Oren's suggestion I get <tiles:getAsString anme="title"/>
> literally in my page's title.
>
> Is it clear whatI'm trying to achieve ?
>
> Best Regards,
> Gonçalo Luiz.
>
> On 03/02/07, Dave Newton <newton.dave@yahoo.com> wrote:
> > --- Gonçalo Luiz <goncalo.luiz@gmail.com> wrote:
> > > I'd like to do something like <s:get
> > > name="<tiles:getAsString
> > > name="title"/>"/> to internationalize my page title.
> >
> > You want to put the key in your tiles file?
> >
> > S2 properties are already I18N-aware:
> >
> > http://cwiki.apache.org/WW/localization.html
> >
> > d.
> >
> >
> >
> >
> >
> ____________________________________________________________________________
> ________
> > Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it
> now.
> >
>
>
> --
> Gonçalo Luiz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Gonçalo Luiz

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


Mime
View raw message