function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
hacksawblade16hacksawblade16 

help with checkboxes

I want to call  methods in controller depending on whether checkbox is checked and how many checkboxes are checked. .I have 2 checkboxes.

Initially by default both checkboxes must be checked.

and callMethod1() when both  checkboxes are checked

2)callMethod2() when first checkbox is checked and second is unchecked

3)callMethod3() when second checkbox is checked first is unchecked.

 

A brief idea on what i'm actually doing here

I have a PageBlocktable with two columns

The column headers are NAME and ADDRESS each with a checkbox

If both NAME and ADDRESS checkboxes are selected,the Name and address will be displayed.

If only the NAME checkbox is checked then only names are displyed and ADDRESS column is empty

If only the ADDRESS checkbox is checked then only address are displayed and NAME column is empty

 

 

 

 

blueflame121blueflame121

You can make a fourth method say method 4() . in this method use the If...else condition and accordingly call your methods