I have a <p:selectOneRadio>
with two <f:selectItem>
and I have two <h:panelGrid>
. I want to hide one of the <h:panelGrid>
depending of the <f:selectItem>
selected.
<p:selectOneRadio>
<f:selectItem itemLabel="Hide pnl1" itemValue="1" />
<f:selectItem itemLabel="Hide pnl2" itemValue="2" />
</p:selectOneRadio>
<h:panelGrid id="pnl1">
//More stuff here...
</h:panelGrid>
<h:panelGrid id="pnl2">
//More stuff here...
</h:panelGrid>
In this example how can i hide pnl1 if the option 1 is selected in the radio?
How can i hide pnl2 if the option 2 is selected in the radio?
Please show me the Bean code needed too.
Only one pnl should be showed