Save h:outputFormat result to a variable

425 Views Asked by At

Currently I am successfully getting the labels from my resource bundle via

<h:outputFormat value="#{labels['key']}">
   <f:param value="my param1"/>
   <f:param value="my param2"/>
</h:outputFormat>

But how do I save it in a variable so that I can use it inline like

<i data-original-title="#{myLabel}"></i>

I am looking for something like

<h:outputFormat var="myLabel" value="#{labels['key']}">
   <f:param value="my param1"/>
   <f:param value="my param2"/>
</h:outputFormat>

But that doesn't seem to work

1

There are 1 best solutions below

0
On

You can use the Omnifaces extension of outputFormat: http://showcase.omnifaces.org/components/outputFormat