Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multi select using check box.

User_K00ZMJan 10 2012 — edited Jan 12 2012
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2012
Added on Jan 10 2012
7 comments
968 views