PDA

View Full Version : get the data using extdirect with spring mvc



chinnib37
17 Apr 2013, 3:21 AM
Hi,
I am using Ext direct in my application.
I am sending request to server using extdirect. But the javascript code is executing with out getting the response from server.

How can I stop execution untill I got the response from server.

here is my code..

Ext.onReady(function () {
Ext.Direct.addProvider(Ext.app.REMOTING_API);

var result= homeController.fetchDetails('xxx');
console.dir(result);

});

here result is getting as null.
can anyone help me to resove this issue...
Thanks.

slemmon
18 Apr 2013, 9:26 PM
You'll need to use a callback param to be called once you get the response back since the call / response are done asynchronously.
You might look at this example for more detail:
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.direct.RemotingProvider-cfg-actions