You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Garner, Shawn" <sh...@pearson.com> on 2006/01/07 18:42:38 UTC

[JSF/Shale] bean:message with parameter

I want to do something like this in JSF:
<bean:message key="affirmation.link1" arg0="<%=szFormType%>"/>

Which I think translates to 

<h:outputText value="#{bundle.affirmation.link1">
  <f:param value="#{szFormType}"/>
</h:outputText>

Is this correct?

Shawn

**************************************************************************** 
This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 
****************************************************************************

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


Re: [JSF/Shale] bean:message with parameter

Posted by Craig McClanahan <cr...@apache.org>.
On 1/7/06, Garner, Shawn <sh...@pearson.com> wrote:
>
> I want to do something like this in JSF:
> <bean:message key="affirmation.link1" arg0="<%=szFormType%>"/>
>
> Which I think translates to
>
> <h:outputText value="#{bundle.affirmation.link1">
>   <f:param value="#{szFormType}"/>
> </h:outputText>



Is this correct?


Almost ... first, try it with <h:outputFormat> instead of <h:outputText>.
And, if you've loaded message bundles that have keys with periods in them,
here's a trick that will simplify your life:

  <h:outputText value="#{bundle['affirmation.link1']}">
    <f:param value="#{szFormType}"/>
  </h:outputText>


Shawn


Craig