DHTMLX Grid loadXML with Struts Action Error Handling

I am using DHTMLXgrid for a POC purpose.I must say - I like the grid component alot

After initializing the grid , I am calling grid.load(…/myAction.do); - This Struts action class execute() method basically creates an XML (response type as text/xml) and populates the grid.

I want to know on since this is kind of Ajax call- how the ajax life cycle is handled.

In case of any errorrs on server side during creation of XML - how can i set errors on the client side ? - generally we get javascript alert saying Incorrect XML - but how to handle the server side errors if any …while loading the grid - with XML created on server .



//data[0] - request object
//data[0].responseText - incorrect server side response
… any kind of custom logic here …

Victor Johnson