I have a message.properties file which contains:
success_text=How cool... You have guessed the number. {0} is correct!
I have a JSF which contains:
<h:outputText value="#{msg.success_text}" >
<f:param value="#{numberBean.userNumber}" />
</h:outputText>
No matter what the value of is, the HTML comes out:
How cool... You have guessed the number. {0} is correct!
Why isn't {0}
changing to the value indicated in the <f:param>
and how can I fix it?
The <f:param>
isn't supported by <h:outputText>
. It works in <h:outputFormat>
only.
<h:outputFormat value="#{msg.success_text}" >
<f:param value="#{numberBean.userNumber}" />
</h:outputFormat>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With