struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Gin" <Gin_C...@tvratings.com>
Subject RE: Struts and Tiles and bean:message
Date Mon, 21 Oct 2002 15:50:11 GMT
Actually I got it partially working right now.
I used the new el tag lib and looked up the value in the pageScope (thanks
to Shawn Bayern for showing me how)
But I'm getting a strange return value.

  	<%-- get title --%>
      <bean-el:message key='${pageScope["page.title"]}'/>

Returns: ??en_US.?? rather than the actual title from my resource mapping.
Why is that?
Thanks,
-Tim

-----Original Message-----
From: Chen, Gin [mailto:Gin_Chen@tvratings.com]
Sent: Monday, October 21, 2002 10:58 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts and Tiles and bean:message


Hi David,
	That was the intended use of page.title.
But I wanted to try to keep within the "struts standards" and define all
msgs within my application resource file.
Are you saying that there is no way to do an indirect mapping?
I mean cant I pull out the value of page.title ("order.status.title" in the
example) from tiles and then pass that to 
bean:message key so that it can look up the mapping of that value in the
application resource?
>From the source of tiles:getAsString it looks like tiles is just getting
that param from context
Can I just get that value from the context myself and pass it into the
bean:message?

Thanks,
-Tim

-----Original Message-----
From: David Graham [mailto:dgraham1980@hotmail.com]
Sent: Monday, October 21, 2002 10:51 AM
To: struts-user@jakarta.apache.org
Subject: Re: Struts and Tiles and bean:message


You can define a global title in your base tiles definition and only 
override it in sub definitions when needed.  Also, you could use 
<bean:message> in your jsp to get the appropriate title key for each page.

David






>From: "Chen, Gin" <Gin_Chen@tvratings.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
>Subject: Struts and Tiles and bean:message
>Date: Mon, 21 Oct 2002 10:39:28 -0400
>
>Hi all,
>	I have an application that defines a specific value in my resource
>properties file as:
>
>order.status.title=Order Status
>
>	Since I am using tiles in my application. My main layout file cannot
>use:
>
><bean:message key="order.status.title"/>
>
>	because it is being used for other pages as well.
>
>	Therefore, for ever subdefinition I define a value page.title:
>
><put name="page.title" value="login.title"/>
>
>	How can I retrieve this to be used for the bean:message? Is there
>another solution?
>
>Thanks,
>-Tim
>
>--
>To unsubscribe, e-mail:   
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:struts-user-help@jakarta.apache.org>


_________________________________________________________________
Unlimited Internet access for only $21.95/month.  Try MSN! 
http://resourcecenter.msn.com/access/plans/2monthsfree.asp


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

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

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


Mime
View raw message