List of dijit checkbox requests inside DIV

I need to find all dijit.form.CheckBox widgets inside a DIV and enable / disable them all. I cannot form the corresponding request.

I tried dojo.query("[dojoType~=dijit.form.CheckBox]"), but it gives me an empty list.

What is the relevant request? Can a DOJO request return a WidgetSet or does it always return DOM identifiers? Is there any other way to request dijit widgets?

+5
source share
2 answers

Try dijit.findWidgets :

Finding a subtree as root, installing the widgets found in OutAry. not searching for embedded widgets (i.e. widgets inside other widgets)

+9
source

1.7 > , findWidgets

"dojo/query" "dijit/registry"

var checkboxes = query("input[type=checkbox]:checked", "myForm");
checkboxes.forEach((function (checkbox) {
    //dom node
    console.log(checkbox);

    //dijit
    console.log(registry.byId(checkbox.id));
})); 

dom node id myForm . , dom node , , , registry.byId(...)

0

All Articles