I need to show and hide a datatable based on the selection made from a dropdown. Is this possible; and if so, how do I do it.
<h:panelGrid columns="2" cellpadding="5">
<p:outputLabel for="lookupType" value="Lookup Type" />
<p:selectOneMenu id="lookupType" value="#{lookupTypeBean.lookupType}" style="width: 300px">
<f:selectItem itemLabel="-- Select Lookup Type --" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{lookupTypeBean.lookupTypes}" />
<p:ajax listener="#{lookupTypeBean.lookupTypeChange()}" />
</p:selectOneMenu>
</h:panelGrid>
I have a method in my bean that is connect to the ajax listener. I have tried to add a rendered property to the with a boolean value but it doen not work (or I did not do it right) either way, hopefully someone can help me.
Thanks