On Wed, 28 Aug 2002, Mark Silva wrote:

> Date: Wed, 28 Aug 2002 16:14:51 -0700
> From: Mark Silva <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Dynamic Messages possible with bean:message tag?
>
> Hello,
>
> I am trying to use the ApplicationResources file to display titles,
> messages, etc.  I would like to create these messages dynamically based
> on a request parameter.
>
> For example
> <bean:message key="AuthenticationReport.title"/>
>
> I would lie to dynamically change the "AuthenticationReport"  based on a
> request variable.  This way I can use a single page for all reports, and
> all international messages too!  Is this possible?  Otherwise I may have
> to create a different page for each report.  Seems like a very useful
> feature.
>

Also very easy to do already - use a runtime expression :-)

  <bean:message key='<%= request.getParameter("report") + ".title" %>'/>

> Thanks,
> Mark

Craig


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

Reply via email to