Search code examples
jsfinternationalizationseamrichfacesresourcebundle

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>

Solution

  • I think this should work:

    <h:outputFormat value="#{msg.yourMessage}">
      <f:param value="#{myBean.jobCount}" />
    </h:outputFormat>