hi
I am currently using DHTMLDataprocessor to add/modify changes for my gridTree on the server side.
I am enclosing sample code i am using in my application
var mygrid = new dhtmlXGridObject(‘gridbox’);
var db = new dataProcessor("<%="/Banking/UpdateUserAccount>");
db.enableDataNames(true);
db.setUpdateMode(“off”);
db.setTransactionMode(“POST”);
db.init(mygrid);
db.sendData();
My server side javacode receives all the parameters, i am able to do all the oracle transactions i need
for my server side code .The problem is when i modify my gridtree contents and click submit, it does not
display a success page, although in java debug mode i am able to see it going into my servlet and
calling the DAO classes to do all the transactions, in the end when my servlet calls a dispatcher forward()
to call the success page, nothing happens at all, despite the fact that in debug i do see my java code calling
the jsp success page. success page doesnt load at all in my browser, i still see the old page.
Is this because of the Ajax call from Dataprocessor which brings the control back to the calling page?
Let me know if something needs to be done from the Dataprocessor api or this is some different problem?
I also wish to know if there is any function within dataprocessor which indicates if any rows are updated
within the grid or not?Is the function getSynState()?
Request you to help me resolve this issue
Hello,
>> Is this because of the Ajax call from Dataprocessor which brings the control back to the calling page?
Yes, it is.
To open some other page after saving data, you can set a function that will handle a response from a server and redirect to the necessary page:
db.attachEvent(“onAfterUpdate”,function(nodeId,cType,newId,node){
var url = node.getAttribute(“url”);
if(url) document.location.href = url;
});
The server-side script should returm xml with url in the action tag: