Skip to main content

getting all widget objects on a form

1 reply [Last post]
kjambor
Offline
Joined: 2004-04-19
Points: 0

Hi,

Is there a way to get all the widgets on a form?
I am looking for a method like jmaki.getAllWidgets() which returns the list of all jMaki widgets on the form.

Regards,

-- Kamyar

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kjambor
Offline
Joined: 2004-04-19
Points: 0

Hi,

Use jmaki.attributes.keys() method to get the list of all widgets names in your form.
Here is sample code I have for getting all my combobox widgets on the form:

{
var widgets = jmaki.attributes.keys();
var widget = "";
var list = new Array();
for (i=0; i {
widget = widgets[i];
widgetObj = jmaki.getWidget(widget);
if (widgetObj instanceof jmaki.widgets.sbm.combobox.Widget)
list.push(widget);
}
return list;
}

-- Kamyar