How can reload items of a select item which is related with a java connector?
The Form loads the structur from a XML and is binded with a grid. The grid is synchronized with a datastore.
My plan:
Select connector used once just lo load options.
To load another set you need something like this:
dhtmlxAjax.get(“conector_url”, function®{
// assume response is xml
// xmlTopNodeName - str, top tagname
var root = r.xmlDoc.responseXML.getElementsByTagName(xmlTopNodeName)[0];
// get options from xml here
var t = myForm.getSelect();
t.options.length = 0;
t.options.add(new Option(name,value))
})
var selectArray = myForm.getAllSelect(); //return a array with all select objects
var t;
for (t in selectArray)
{
t.reload(); //call the connector again and reload all items in the select
}
Question:
Has the form a list with all items?
Has each item an identifier to know what type of item it is?
Has the select item a parameter with the connector url?