tags:

views:

74

answers:

0

In the code sample below, I am directly using dwr.engine._execute and calling the method. It works fine where we have atleast one input parameter, but with methods like the one below, the method gets triggered and I get the response data but the callback does not fire. Any reasons as to why is this happening? [this is with DWR 3.0]

var oName = "AccountOpsRemote";

var fetchAccounts = function(cb) {
    dwr.engine._execute(sprDwrPath, oName, 'fetchAccounts', {
        callback : function(data) {
            sprLoadedState["accounts"] = data;
            if (cb) {
                cb(data);
            }
        },
        errorHandler : function(errorString, exception) {
            sprCommon().dwrError(errorString, exception);
        }
    });
};