Not getting data from AW.XML.Table
Based on a V2.0 thread in the forum, I've used the following example code for the test:
var dataTable = new AW.XML.Table; dataTable.setURL("myfilename"); dataTable.setColumns(["Device", "Status", "Timestamp", "Appr Rate", "Balance"]); dataTable.request(); var gridObj = new AW.UI.Grid; gridObj.setColumnCount(5); gridObj.setHeaderText(["Device", "Status", "Timestamp", "Appr Rate", "Balance"]); gridObj.setCellModel(dataTable); document.write(gridObj);
If I look at the table right after the dataTable.request();, it contains zero rows. If I wait half a second and look at the table after it's had time to fetch the data, I see 15 rows. If I add gridObj.refresh(); at this point, which I expected to be the last required step, I still see nothing in the grid.
The XML data, from the V1.xx code, looks like this:
<?xml version="1.0"?> <ArrayOfDevices xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/"> <device> <id>Y5562201</id> <status>Up</status> <timestamp>01/01/2006 12:13:15</timestamp> <approval>57%</approval> <balance>123456</balance> </device> ... </ArrayOfDevices>
Error: uncaught exception: [Exception... "The expression is not a legal expression." code: "51" nsresult: "0x805b0033 (NS_ERROR_DOM_INVALID_EXPRESSION_ERR)" location: "http://localhost:8080/pages/ActiveWidgets/source/lib/xml/table.js Line: 212"]
Thanks in advance for any help anyone can offer.