Assuming I have the following two Panels under a Parent Panels, as show in code below
Code: Select all
<p:panel id="parentPanel" header="Parent Parent">
<p:panel id="panel1" header="Panel One" rendered="#{someBean.someCondition}">
<!-- Panel Content Skip -->
</p:panel>
<p:panel id="panel2" header="Panel Two" rendered="#{!someBean.someCondition}">
<!-- Panel Content Skip -->
</p:panel>
<p:commandButton id="toggleButton" value="Click me.." actionListener="#{someBean.togglePanel}" update="parentPanel"/>
</p:panel>
Any suggestion?
Thanks in Advance