views:

635

answers:

2

I need to find all dijit.form.CheckBox widgets inside a DIV and enable/disable them all. I am not able to form appropriate query for it.

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

What is the appropriate query for it? Can DOJO query return a WidgetSet or does it always returns DOM ids? Is there some different way for querying dijit widgets?

+1  A: 

Try dijit.findWidgets:

Search subtree under root, putting found widgets in outAry. Doesn't search for nested widgets (ie, widgets inside other widgets)

Maine
Thanx. ``dijit.findWidgets`` works. Apart from this, to filter out the checkbox widgets, I wrote something like ``dojo.filter(widgets,function(w) {return w.declaredClass =='dijit.form.CheckBox';});``.
Shailesh Kumar
A: 

.......................... ///////////////. ........

Faqih