neon-server/src/main/javascript/widget/widget.js
function getSavedState(id, successCallback) {
        return neon.util.ajaxUtils.doGet(
            neon.serviceUrl('widgetservice', 'restorestate/' + encodeURIComponent(id)), {
                success: function(data) {
                    if(!data) {
                        return;
                    }
                    if(successCallback && typeof successCallback === 'function') {
                        successCallback(data);
                    }
                },
                error: function() {
                    //Do nothing, the state does not exist.
                },
                responseType: 'json'
            }
        );
    }
function getSavedState(id, successCallback) {
        return neon.util.ajaxUtils.doGet(
            neon.serviceUrl('widgetservice', 'restorestate/' + encodeURIComponent(id)), {
                success: function(data) {
                    if(!data) {
                        return;
                    }
                    if(successCallback && typeof successCallback === 'function') {
                        successCallback(data);
                    }
                },
                error: function() {
                    //Do nothing, the state does not exist.
                },
                responseType: 'json'
            }
        );
    }
function getSavedState ( id , successCallback ) { return neon . util . ajaxUtils . doGet ( neon . serviceUrl ( 'widgetservice' , 'restorestate/' + encodeURIComponent ( id ) ) , { success : function ( data ) { if ( ! data ) { return ; } if ( successCallback && typeof successCallback === 'function' ) { successCallback ( data ) ; } } , error : function ( ) { //Do nothing, the state does not exist. } , responseType : 'json' } ) ; }
Gets the current state that has been saved.
@method getSavedState
@param {String} id an unique identifier of a client widget
@param {Function} successCallback The callback that contains the saved data.
@return {neon.util.AjaxRequest} The xhr request object
Gets the current state that has been saved .