Anyone have a simple example of how to send success and failure back to the client EXT application?
I see how to set up the client side, but I havent seen a simple "hello world"type jsp or servlet that processes the client info and sends a response back.
Anyone have one? Or just some example code snippet you have?
I have written one simple Ajax program using servlet response. I searched a lot over net, but couldnt get any easy example. So, I have posted that
simple ajax program at my blog.
And use load() or Ext.ajax.request in Ext code.
If you use load(), then use callback method to read the response.
Like as below in your submit button code.
function doSave(){
var me = Ext.get('fName').dom.value;
var m = Ext.get('test');
Ext.Ajax.request({
url:'SaveName.jsp',
method:'GET',
params:{
firstName: me,
lastName:'Singh',
email: 'someParamValue'
},
success: function(o) {
alert("Hi");
alert(o.responseText);
},
failure: function(o){
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?');