jsf2 h:outputText标记没有使用MessageFormat格式化h:outputText

Thi*_*niz 1 resources jsf facelets internationalization jsf-2

jsf2 h:outputText标记没有使用MessageFormat格式化h:outputText

我的面孔配置

<application>
    <resource-bundle>
        <base-name>Messages_pt_BR</base-name>
        <var>bundle</var>
    </resource-bundle>
</application>
Run Code Online (Sandbox Code Playgroud)

我的资源包:

...
EventPageTitle=Event: {0}
...
Run Code Online (Sandbox Code Playgroud)

我的JSF2 XHTML:

<h:outputText value="#{bundle.EventPageTitle}" >
   <f:param value="#{seuTicketEventController.selected.eventName}"/>
</h:outputText>
Run Code Online (Sandbox Code Playgroud)

输出:

Event: {0}
Run Code Online (Sandbox Code Playgroud)

有谁知道如何解决这个问题?我到处搜索但我无法解决!

Bal*_*usC 5

你需要<h:outputFormat>这个,而不是<h:outputText>.