How to use EL with p:panel header?

2019-03-07 10:21发布

问题:

I want to put a dynamic string inside a p:panel header just like using it with p:inputText for example value="#{object.property}" is it possible to do that ?

回答1:

Just use <f:facet name="header"> facet within your <p:panel>:

<p:panel>
    <f:facet name="header">
        <p:inputText value=#{object.property} />
        ...
    </f:facet>
    ...
</p:panel>

Or, if you want to output some text there, you can use <p:panel header="#{object.property}" ... >.