p:selectCheckboxMenu ajax event name for on close
ajax, jsf, primefaces
Solution
You can try onhide attribute of the p:selectCheckboxMenu.
<p:selectCheckboxMenu id="colser"
scrollHeight="100"
filterMatchMode="contains"
filter="true"
label="Colonnes"
value="#{datatableBean.selectedstateOptions}"
onHide="executeOnOnhide();>
<f:selectItems value="#{datatableBean.columner}"
var="list"
itemLabel="#{list.listname}"
itemValue="#{list.headername}"/>
</p:selectCheckboxMenu>
<p:remoteCommand name="executeOnOnhide"
update=":form1:tabexam" process="@this form:colser"
action="#{datatableBean.updateCols()}"/>
The link for the documentation guide for primefaces for your reference http://primefaces.org/documentation.html
Hope this helps
Problem
I need to trigger action on the `p:selectCheckboxMenu` when user finishes his selection(s) (on close). the `datatable` need to be updated with new selected columns(done). I couldn't find the event name of the ajax behavior that suits this principal role of a Menu.the default ajax behavior of the `p:selectCheckboxMenu` updates the datatable on every selection which is annoying for me and the user, i need only the `p:selectCheckboxMenu` to trigger action when it is closed. Here is my code : ``` <p:selectCheckboxMenu id="colser" scrollHeight="100" filterMatchMode="contains" filter="true" label="Colonnes" value="#{datatableBean.selectedstateOptions}"> <f:selectItems value="#{datatableBean.columner}" var="list" itemLabel="#{list.listname}" itemValue="#{list.headername}"/> <p:ajax event="close_event_name_here" update=":form1:tabexam" listener="#{datatableBean.updateCols()}"/> </p:selectCheckboxMenu> ```