AW.UI.List populate from XML
I am trying to populate a combo box of phone numbers in a grid from an XML source. Ideally I would like to populate the list object from the XML file that fills the grid, however adding a phone list child node in the structure will probably break the XML structure required for grids. If I can populate the list object form the XML I can then assign that list to any combo box I need. Any ideas on how to do this?
Thanks.
JimV
October 3,
Ok I did this by embedding an HTML select statement in my XML with CDATA. The grid uses the HTML format for that column and it works fine.
<phone>
<![CDATA[<select class="phoneSelectBox">
<option>H-309-641-1942</option>
<option>W-309-641-2342</option>
</select>]]>
</phone>
JimV
October 4,
I am also trying to populate a list from XML, but I did not understand your response. I am actually struggling with populating the list from the xml. I have a grid that is populated from XML over HTTP, but I haven't found the sequence to make it work. The only way I have found that works is to populate it by declaring a couple of JS arrays in my jsp. This won't work, as it need it to be dynamic.
var docList = new AW.UI.List;
var values = ["1", "4","14"];
var labels = ["Vendor", "Other Vendor", "yet Another"];
docList.setItemText(labels);
docList.setItemValue(values);
docList.setItemCount(listSrc.length);
This works, but what I really need is to be able to pull the values for the list from the XML that is populating the grid. I could also populate it by creating a separate AW.XML.Table. However, I haven't been able to figure out the syntax to populate the list from any XML.
Any help?
MikeM
October 29,