Thiago Diniz
Thiago Diniz

Reputation: 3121

The jsf2 h:outputText tag is not formating the h:outputText with the MessageFormat

The jsf2 h:outputText tag is not formating the h:outputText with the MessageFormat

my faces config

<application>
    <resource-bundle>
        <base-name>Messages_pt_BR</base-name>
        <var>bundle</var>
    </resource-bundle>
</application>

My resource bundle:

...
EventPageTitle=Event: {0}
...

My JSF2 XHTML:

<h:outputText value="#{bundle.EventPageTitle}" >
   <f:param value="#{seuTicketEventController.selected.eventName}"/>
</h:outputText>

The Output:

Event: {0}

Does anyone knows how to solve this problem? I have searched everywhere but i can't a solution!

Upvotes: 1

Views: 1433

Answers (1)

BalusC
BalusC

Reputation: 1108722

You need <h:outputFormat> for this, not <h:outputText>.

Upvotes: 5

Related Questions