Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF-2. h:outputFormat. Complex f:param

Tags:

jsf-2

How can one parameter output become another parameter input (value)? Or in other words how can i build a complex parameter.

I tried to build parameter. Here is the code:

<h:outputFormat value="Final result is: {0}">
    <f:param>
        <h:outputFormat value="{0} to {1}">
            <f:param value="#{mngr.lowerBound}"/>
            <f:param value="#{mngr.upperBound}"/>
        </h:outputFormat>
    </f:param>
</h:outputFormat>
like image 774
Benas Avatar asked Oct 17 '13 08:10

Benas


1 Answers

You can't using standard JSF functionality. But OmniFaces can do this for you. They implemented a special o:param tag.

For you case, that would be:

<h:outputFormat value="Final result is: {0}">
    <o:param>
        <h:outputFormat value="{0} to {1}">
            <f:param value="#{mngr.lowerBound}"/>
            <f:param value="#{mngr.upperBound}"/>
        </h:outputFormat>
    </o:param>
</h:outputFormat>
like image 182
LaurentG Avatar answered Sep 25 '22 23:09

LaurentG