I have an XMLHTTP request that returns my response, which gets
further parsed down the the correct part of the XML with:
var nd = responseNode.getElementsByTagName("Checks");
I thought it would be as simple as setting the table's XML like:
var table = new AW.XML.Table;
var obj = new AW.UI.Grid;
var columns = ["Check No", "Amount", "Date"];
var str = new AW.Formats.String;
var num = new AW.Formats.Number;
var money = new AW.Formats.Number;
var dte = new AW.Formats.Date;
obj.setCellFormat([str, money, dte]);
But this doesn't work at all.
My XML looks like:
I've tried various iterations of the setXML:
All of which do not work, and I believe the nd.text part even gives me an
error saying that's the wrong object type passed.
I've also tried to display the nd.xml before I create the table & grid,
and it's perfect. I can't even do var myVar = table.getXML(); after
the setXML - that returns nothing.
To complicate this - if I store my XML to a file, the exact way
it's stored in nd.xml, I can then setURL("myXML.xml") and request() -
and the grid displays perfectly!
It's like setXML() is just broken. Or there's some other step
the request() does behind the scenes that's missing for
the table to be initialized and useable for the
setCellModel(). (but I'm thinking it's the table and not
just the grid since I can't seem to get the getXML()
to return the right values either.