setXML() again and XML
I have a table I'm populating with an external SOAP call outside of AW and trying to get the changes in the grid written back to that XML. I've seen the table.setText solution for that multiple times in the forums and tried this:
var table = new AW.XML.Table;
var obj = new AW.UI.Grid;
obj.setId("myGrid");
table.setText = function(value, i, j){
var node = this.getNode(i, j);
node.text = value; }
table.setXML(myXMLObject.xml);
obj.setCellModel(table);
obj.setColumnCount(7);
obj.setRowCount(myXMLObject.childNodes.length);
document.write(obj);
I get errors at runtime that say there's an error on the
line of the table.setText - if I put some alert()'s in
I find that value, i, and j inside the function are
being called with all three equal 'null'. Is this another
case where the table.request() has done something
to set up the table and table.setXML() is left without
that?
I'm almost thinking at this point the whole approach of
the table.setText is wrong anyway - no matter how
often it's thrown about here. Why shouldn't the grid's
on value change of the cell go off to the XML node and
modify that? Change the grid, change the XML that's
what the tie should be.
Geoff
March 13,