Multi select using check box.
Hi.
I have table that has one of the header column to be a check box. The table allows multi- select of rows. If I multi- select the rows, and check the checkbox in the header, it has to set the selected rows' checkbox to selected state.
I have set the Value Change Listener on the header check box. When I multi select rows and click the check box , it takes me to the Value change listener method in the bean. But the value of the checkbox by the method ValueChangeEvent.getNewValue() - still says false.
Am I missing something on this?
Code snippet is as follows,
PhaseId phaseId = valueChangeEvent.getPhaseId();
if (PhaseId.ANY_PHASE.equals(phaseId)) {
valueChangeEvent.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
valueChangeEvent.queue();
} else if (phaseId.equals(PhaseId.UPDATE_MODEL_VALUES)) {
boolean isSelected = ((Boolean)valueChangeEvent.getNewValue()).booleanValue();
System.out.println("The value is "+valueChangeEvent.getNewValue());
Thanks & Regards,
Priya.R