Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to dynamically pass arguments to messages in the resource bundle

I would like to retrieve the message information from the i18n bundle (messages.properties in seam), but I am not sure how to pass the declare / pass the jobCount variable dynamically in my xhtml

The existing code looks like this.

<s:decorate template="/layout/panel-name.xhtml">
    <ui:define name="label">User has been assigned #{jobCount} jobs</ui:define>
</s:decorate>
like image 856
Sam Avatar asked Aug 02 '10 04:08

Sam


1 Answers

I think this should work:

<h:outputFormat value="#{msg.yourMessage}">
  <f:param value="#{myBean.jobCount}" />
</h:outputFormat>
like image 189
Migol Avatar answered Sep 24 '22 15:09

Migol