I have a number of check boxes that users can click on to activate a layer on each checkbox. After a number of check boxes clicked, I would like to capture the click event but not check the checkbox (stop any further actions), and inform the user that the max number of boxes is reached. If the user deselect a checkbox, then the functionality is restored again.
Suggestions? Thanks.
this.own(on(layerCheckbox.domNode, 'click', lang.hitch(this, function(){
if (numberofcheckboxes >5) //criteria met
{
--------------
} else {
})
Solved! Go to Solution.
I resolved the situation by using:
registry.byId(mycheckbox).setValue(false);
I don't know why the
registry.byId(mycheckbox).set("checked", false)
does not work.