Is there a working example of the DOMGrid component available somewhere? Reading various forum posts, I've been able to somewhat piece this together... but it isn't working as I'd expect. With the code below I am able to retrieve the XML from my server without issue, however populating the DOMGrid yeilds an object containing only <></>. Am I missing something here?
Also tried using xmlText - same result.
I'm using SmartClient 6.5.1
Code:
this.myDOMGrid = isc.DOMGrid.create({ name: "myDOMGrid", parent: this, showResizeBar: true, canEdit: false, showFilterEditor: false, autoFetchData: false, height: "95%", fetchXML: function(criteria){ var url = "url_to_my_data"; var params = { OUTPUT_FORMAT: 'XML', OPERATION_TYPE: 'fetch' }; params = isc.addProperties({}, criteria, params); var RPCRequest = isc.RPCRequest.create({ httpMethod: 'POST', params: params }); callback = {target: this, methodName: "populateXML"}; isc.XMLTools.loadXML(url, callback, RPCRequest); }, populateXML: function(xmlDoc, xmlText){ this.setRootElement(xmlDoc); } });
Code:
populateXML: function(xmlDoc, xmlText){ this.setRootElement(xmlText); }
Comment