I have a JSF:Primefaces SelectCheckBoxMenu
<p:selectCheckboxMenu value="#{domain.listaa}" label="Chooese!" style="height:25px" showCheckbox="true">
<p:ajax update="records" listener="#{domain.muti}" />
<f:selectItems value="#{domain.recLabels}"/>
</p:selectCheckboxMenu>
In the managed beans:
private boolean[] recFlags = new boolean[]{true,true,true,true,true,true,true};
private String[] recLabels = new String[]{"A","AAAA","MX","NS","SOA","CNAME","TXT"};
private List<String> listaa = new ArrayList<>();
public void muti(AjaxBehaviorEvent event){
Arrays.fill(recFlags, false);
for(int i=0;i<recLabels.length;i++){
if(listaa.contains(recLabels[i])){
recFlags[i]=true;
}
}
System.out.println(listaa.toString());
}
So in the SelectCheckBoxMenu I press any button, the ajax call is working, and the muti() function will run. There is no problem. But if I press the 'select all' (most above) button in the SelectCheckboxMenu, the ajax call is not working, muti() function won't run and the listaa (List about the pressed checkboxs) is not changing. Why? How can I solve, that 'select all' button works?