rice-framework/krad-web/src/main/webapp/krad/scripts/krad.request.js
/**
 * Constructs a new request object with data from the given action object.
 *
 * @param action (optional) reference to the action that triggers the request. If given request
 * attributes will be pulled from the action data
 */
Constructs a new request object with data from the given action object.

@param action (optional) reference to the action that triggers the request. If given request
attributes will be pulled from the action data
Constructs a new request object with data from the given action object . @param action ( optional ) reference to the action that triggers the request . If given request attributes will be pulled from the action data
function KradRequest(action) {
    if (!action) {
        return;
    }
    if (action) {
        this.$action = action;
    }
    if (action.data("ajaxsubmit") !== undefined) {
        this.ajaxSubmit = action.data("ajaxsubmit");
    }
    this.additionalData = jQuery.extend({}, action.data(kradVariables.SUBMIT_DATA));
    this.methodToCall = this.additionalData['methodToCall'];
    if (action.data("successcallback") !== undefined) {
        this.successCallback = action.data("successcallback");
    }
    if (action.data("errorcallback") !== undefined) {
        this.errorCallback = action.data("errorcallback");
    }
    if (action.data("presubmitcall") !== undefined) {
        this.preSubmitCall = action.data("presubmitcall");
    }
    if (action.data("confirmdialogid") !== undefined) {
        this.confirmDialogId = action.data("confirmdialogid");
    }
    if (action.data("confirm_prompttext") !== undefined) {
        this.confirmPromptText = action.data("confirm_prompttext");
    }
    if (action.data("dismissdialogoption") !== undefined) {
        this.dismissDialogOption = action.data("dismissdialogoption");
    }
    if (action.data("dismissdialogid") !== undefined) {
        this.dismissDialogId = action.data("dismissdialogid");
    }
    if (action.data("validate") !== undefined) {
        this.validate = action.data("validate");
    }
    if (action.data("loadingmessage") !== undefined) {
        this.loadingMessage = action.data("loadingmessage");
    }
    if (action.data("disableblocking") !== undefined) {
        this.disableBlocking = action.data("disableblocking")
    }
    if (action.data("ajaxreturntype") !== undefined) {
        this.ajaxReturnType = action.data("ajaxreturntype");
    }
    if (action.data("refreshid") !== undefined) {
        this.refreshId = action.data("refreshid");
    }
    if (action.data("dirtyonaction") !== undefined) {
        this.dirtyOnAction = action.data("dirtyonaction");
    }
    if (action.data("cleardirtyonaction") !== undefined) {
        this.clearDirtyOnAction = action.data("cleardirtyonaction");
    }
    if (action.data("fieldstosend") !== undefined) {
        this.fieldsToSend = action.data("fieldstosend");
    }
}
function KradRequest ( action ) { if ( ! action ) { return ; } if ( action ) { this . $action = action ; } if ( action . data ( "ajaxsubmit" ) !== undefined ) { this . ajaxSubmit = action . data ( "ajaxsubmit" ) ; } this . additionalData = jQuery . extend ( { } , action . data ( kradVariables . SUBMIT_DATA ) ) ; this . methodToCall = this . additionalData [ 'methodToCall' ] ; if ( action . data ( "successcallback" ) !== undefined ) { this . successCallback = action . data ( "successcallback" ) ; } if ( action . data ( "errorcallback" ) !== undefined ) { this . errorCallback = action . data ( "errorcallback" ) ; } if ( action . data ( "presubmitcall" ) !== undefined ) { this . preSubmitCall = action . data ( "presubmitcall" ) ; } if ( action . data ( "confirmdialogid" ) !== undefined ) { this . confirmDialogId = action . data ( "confirmdialogid" ) ; } if ( action . data ( "confirm_prompttext" ) !== undefined ) { this . confirmPromptText = action . data ( "confirm_prompttext" ) ; } if ( action . data ( "dismissdialogoption" ) !== undefined ) { this . dismissDialogOption = action . data ( "dismissdialogoption" ) ; } if ( action . data ( "dismissdialogid" ) !== undefined ) { this . dismissDialogId = action . data ( "dismissdialogid" ) ; } if ( action . data ( "validate" ) !== undefined ) { this . validate = action . data ( "validate" ) ; } if ( action . data ( "loadingmessage" ) !== undefined ) { this . loadingMessage = action . data ( "loadingmessage" ) ; } if ( action . data ( "disableblocking" ) !== undefined ) { this . disableBlocking = action . data ( "disableblocking" ) } if ( action . data ( "ajaxreturntype" ) !== undefined ) { this . ajaxReturnType = action . data ( "ajaxreturntype" ) ; } if ( action . data ( "refreshid" ) !== undefined ) { this . refreshId = action . data ( "refreshid" ) ; } if ( action . data ( "dirtyonaction" ) !== undefined ) { this . dirtyOnAction = action . data ( "dirtyonaction" ) ; } if ( action . data ( "cleardirtyonaction" ) !== undefined ) { this . clearDirtyOnAction = action . data ( "cleardirtyonaction" ) ; } if ( action . data ( "fieldstosend" ) !== undefined ) { this . fieldsToSend = action . data ( "fieldstosend" ) ; } }
Constructs a new request object with data from the given action object.
Constructs a new request object with data from the given action object .