Why doesn't f: param render inside h: outputText?

I have a message.properties file that contains:

success_text = How cool ... You have guessed the number. {0} is correct!

I have a JSF that contains:

<h:outputText value="#{msg.success_text}" >
    <f:param value="#{numberBean.userNumber}" />
</h:outputText>

Regardless of what the value is, HTML comes out:

How great ... You guessed how much. {0} right!

Why doesn't it {0}change to the value specified in <f:param>, and how can I fix it?

+3
source share
1 answer

<f:param>not supported <h:outputText>. It only works in <h:outputFormat>.

<h:outputFormat value="#{msg.success_text}" >
    <f:param value="#{numberBean.userNumber}" />
</h:outputFormat>
+3
source

Source: https://habr.com/ru/post/1774413/


All Articles