Primefaces 如何设置xhtml面板关闭时的标题
我使用以下代码:Primefaces 如何设置xhtml面板关闭时的标题,primefaces,xhtml,Primefaces,Xhtml,我使用以下代码: <p:panel header="Advanced User Data" toggleable="true" toggleOrientation="horizontal" collapsed="true"> some other stuff... </p:panel> 其他一些东西。。。 当面板关闭时,是否有一个属性可用于设置标题,如下所示: 没有像这样的属性。您可以将collapsed属性的值绑定到托管bean,并在toggle事件上添加
<p:panel header="Advanced User Data" toggleable="true" toggleOrientation="horizontal" collapsed="true">
some other stuff...
</p:panel>
其他一些东西。。。
当面板关闭时,是否有一个属性可用于设置标题,如下所示:
没有像这样的属性。您可以将
collapsed
属性的值绑定到托管bean,并在toggle
事件上添加AJAX侦听器:
<p:panel header="Advanced User Data" toggleable="true"
toggleOrientation="horizontal" collapsed="#{myBean.booleanVal}" style="display: inline-block;">
<p:ajax event="toggle" process="@this" update="pnlAlternativeTitle" />
</p:panel>
<h:panelGroup id="pnlAlternativeTitle">
<h:outputText rendered="#{myBean.booleanVal}"
value="Alternative title" />
</h:panelGroup>
没有像AFAIK这样的属性。您可以将
collapsed
属性的值绑定到托管bean,并在toggle
事件上添加AJAX侦听器:
<p:panel header="Advanced User Data" toggleable="true"
toggleOrientation="horizontal" collapsed="#{myBean.booleanVal}" style="display: inline-block;">
<p:ajax event="toggle" process="@this" update="pnlAlternativeTitle" />
</p:panel>
<h:panelGroup id="pnlAlternativeTitle">
<h:outputText rendered="#{myBean.booleanVal}"
value="Alternative title" />
</h:panelGroup>