I have a question. Is it possible to update two components at once? I am trying code like this:
<h:panelGroup id="pickList"> <p:panel rendered="#{customCalender.visible}" widgetVar="searchTableBox"> //Some codes..... <p:commandButton value="Cancel" update="pickList" actionListener="#{customCalender.closeList}" style="background:#25A6E1;color:red;font-family:'Helvetica Neue',sans-serif;font-size:10px;border-radius:4px;" /> <p:commandButton value="Save" update="custDataTablePanel" actionListener="#{customCalender.saveTargetList}" style="background:#25A6E1;color:red;font-family:'Helvetica Neue',sans-serif;font-size:10px;border-radius:4px;"/> </p:panel> </h:panelGroup> .... ..... <h:panelGroup id="custDataTablePanel"> <p:panel rendered="#{customCalender.dataTableVisible}"> .. .. </p:panel> </h:panelGroup>
Now, when I click the Save button, it hides <h:panelGroup id="pickList"> and displays <h:panelGroup id="custDataTablePanel"> , so I have two Boolean values to control their visibility. but I need to update two of these panels. One of them with update="custDataTablePanel" displays a data table after clicking a button. (In the saveTargetList method saveTargetList I updated the visibility of custDataTablePanel to true.), But I could not hide the pickList panel.
So, I wandered if there is a way to hide and show these two panels with the click of a button. Please suggest.
source share