The following code comes directly from one of the grid examples and it works fine:
PHP Code:
var store = new Ext.data.Store({
// load using HTTP
url: 'plants.xml',
// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({
// records will have a "plant" tag
record: 'plant'
}, Plant),
sortInfo:{field:'common', direction:'ASC'}
});
Instead of getting the data from an XML file I want to retrieve the data using a Servlet. I changed the URL option to point to a Servlet but now the store does not seems to be working correctly (see code below.) I verified the Servlet is sending the correct XML data to the output stream. In fact, if I take the Servlet output and past it in an XML file and then point the URL to that file everything works fine. Is there something else I need to do to retrieve the data from a Servlet rather than a file?
Thanks,
PHP Code:
var store = new Ext.data.Store({
// load using HTTP
url:'http://199.131.146.205:8988/prototypes-EXT-context-root/loadViewColumns?viewName='+viewName,
// the return will be XML, so lets set up a reader
reader: new Ext.data.XmlReader({
// records will have a "plant" tag
record: 'plant'
}, Plant),
sortInfo:{field:'common', direction:'ASC'}
});