⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rpcmanager.js

📁 javascript 很酷的类库
💻 JS
📖 第 1 页 / 共 5 页
字号:
    //<    STATUS_FAILURE: -1,    //> @classAttr rpcResponse.STATUS_VALIDATION_ERROR (integer : -4 : R)    //    // Indicates a validation failure on the server.    // See the error handling section in +link{class:RPCManager, RPCManager documentation}    // for more information.        //     // @see class:RPCRequest    // @group statusCodes    // @visibility external    //<    STATUS_VALIDATION_ERROR: -4,    //> @classAttr rpcResponse.STATUS_LOGIN_INCORRECT (integer : -5 : R)    //    // Indicates that the RPC has been intercepted by an authenticator that requires the user    // to log in.    //     // @see class:RPCRequest    // @group statusCodes    // @visibility external    //<    STATUS_LOGIN_INCORRECT: -5,    //> @classAttr rpcResponse.STATUS_MAX_LOGIN_ATTEMPTS_EXCEEDED (integer : -6 : R)    //    // Indicates that too many authentication attempts have been made and the server refuses to    // accept any more login attempts.    //     // @see class:RPCRequest    // @group statusCodes    // @visibility external    //<    STATUS_MAX_LOGIN_ATTEMPTS_EXCEEDED: -6,    //> @classAttr rpcResponse.STATUS_LOGIN_REQUIRED (integer : -7 : R)    //    // Indicates that a login is required before this RPCRequest can proceed.    //     // @see class:RPCRequest    // @group statusCodes    // @visibility external    //<    STATUS_LOGIN_REQUIRED: -7,    //> @classAttr rpcResponse.STATUS_LOGIN_SUCCESS (integer : -8 : R)    //    // Indicates that the login succeeded.    //     // @see class:RPCRequest    // @group statusCodes    // @visibility external    //<    STATUS_LOGIN_SUCCESS: -8,    //> @classAttr rpcResponse.STATUS_TRANSPORT_ERROR (integer : -90 : R)    //    // This response code is usable only with the XMLHttpRequest transport and indicates that    // the server returned an HTTP response code other than 200: OK.  To get the actual    // response code, you can query rpcResponse.httpResponseCode in your callback.    // <p>    // Note that currently this error code will never occur for the <code>hiddenFrame</code>    // transport - instead, use +link{RPCResponse.STATUS_SERVER_TIMEOUT} to detect    // <code>hiddenFrame</code> transport errors.    //    // @group statusCodes    // @visibility external    //<    STATUS_TRANSPORT_ERROR: -90,    //> @classAttr rpcResponse.STATUS_SERVER_TIMEOUT (integer : -100 : R)    //    // Indicates a request timed out with no server response.    // <p>    // This is a client-only error code - never sent by the server (since it's the server    // that times out).    // <p>    // NOTE that if using <code>hiddenFrame</code> as the transport (not the default), a    // malformed response such as a "500 Server Error" or 404 errors will be reported as a    // timeout.     //    // @group statusCodes    // @visibility external    //<    STATUS_SERVER_TIMEOUT: -100}});isc.RPCResponse.addClassProperties(isc.RPCResponse.errorCodes);// alias DSResponse to RPCResponse so that end users can use the response codes as// e.g. DSResponse.STATUS_SUCCESSisc.addGlobal("DSResponse", isc.RPCResponse);isc.RPCManager.addClassProperties({    // truncate warn() dialog with server error to this many chars    maxErrorMessageLength: 1000,    // truncate extra long RPCManager log messages unless RPCManagerResponse has been set    maxLogMessageLength: 25000,    //> @classAttr RPCManager.defaultTimeout (number : 240000 [4 minutes] : RW)    //    // In milliseconds, how long the RPCManager waits for an RPC request to complete before    // returning an error.  If set to zero, the RPCManager will not enforce a timeout, but note that    // most browsers enforce their own timeouts on HTTP requests.    // <p>    // For the "xmlHttpRequest" transport, this timeout can only happen if the server actually fails to    // respond within the specified number of milliseconds.  For the "hiddenFrames" transport,    // this timeout will occur for non-200 (HTTP_OK) responses.    //     // @visibility external    //<    defaultTimeout: 240000,     //>@groupDef    i18nMessages    // The properties in this group are default system messages that a localized     // application will want to override on a per-locale basis    // @see group:i18n    // @visibility external    //<        //> @classAttr RPCManager.defaultPrompt (string : "Contacting Server..." : IRW)    //    // If showPrompt is enabled for a given transaction, this is the defaultPrompt to be shown    // to the user in a modal dialog while the transaction occurs.    // May be overridden at the request level via +link{attr:rpcRequest.prompt}.<br>    // More targetted default prompts are also supported for certain code-paths. See the following     // set of properties for details:<ul>    // <li>+link{RPCManager.removeDataPrompt}</li>    // <li>+link{RPCManager.saveDataPrompt}</li>    // <li>+link{RPCManager.fetchDataPrompt}</li>    // </ul>    //    // @see classAttr:RPCManager.showPrompt    // @see classAttr:RPCManager.promptStyle    // @see classAttr:RPCManager.promptCursor    // @see attr:rpcRequest.showPrompt    // @see attr:rpcRequest.prompt    // @see attr:rpcRequest.promptStyle    // @see attr:rpcRequest.promptCursor    //    // @visibility external    // @group rpcPrompt    // @group i18nMessages    //<    defaultPrompt:"Contacting server...",        //> @classAttr RPCManager.timeoutErrorMessage   (string : "Operation timed out" : IRW)    // Default message displayed to user when an opration fails to return from the server within    // the timeout period specified by +link{RPCManager.defaultTimeout}.    // @see classAttr:RPCManager.defaultTimeout    // @visibility external    // @group i18nMessages    //<    timeoutErrorMessage:"Operation timed out",        //> @classAttr RPCManager.removeDataPrompt  (string : "Deleting Record(s)..." : IRW)    // Default prompt displayed to user while an opration is running to remove data from    // the server.<br>    // Displayed as a result of the +link{ListGrid.removeSelectedData()} code path.    // @visibility external    // @group i18nMessages    //<    removeDataPrompt:"Deleting record(s)...",            //> @classAttr  RPCManager.saveDataPrompt   (string : "Saving form..." : IRW)    // Default prompt displayed to the user while an opreration is running to save data to    // the server.<br>    // Displayed as a result of the +link{DynamicForm.saveData()} code path.    // @visibility external    // @group i18nMessages    //<    saveDataPrompt:"Saving form...",        //> @type PromptStyle    //    // @value "dialog" Displays a centered modal prompt with text specified by    //                 +link{rpcRequest.prompt}    // @value "cursor" Changes the current cursor to the style specified by    //                 +link{rpcRequest.promptCursor}    //    // @visibility external    //<    //> @classAttr  RPCManager.promptStyle   (PromptStyle : "dialog" : IRW)    // Controls the default prompt style.  Overrideable by +link{attr:rpcRequest.promptStyle}.    //    // @visibility external    // @see attr:rpcRequest.promptStyle    // @group rpcPrompt    //<    promptStyle: "dialog",    //> @classAttr RPCManager.useCursorTracker (boolean : platform-dependent : IRW)    //    // If true, an image is shown to the right of the cursor when +link{rpcRequest.promptStyle} is    // set to "cursor", otherwise the cursor itself is modified via css to the value of    // +link{rpcRequest.promptCursor}.  The default is platform-dependent.  In Safari, IE 5.5 and    // Firefox 1.0 the default is true, on all other platforms it is false.  The reason for    // this split is that, the above browsers require that the cursor move before CSS settings are    // re-evaluated - this means the progress cursor can stick until the user moves the mouse.    // <p>    // This value can be overridden on a per-request basis via +link{rpcRequest.useCursorTracker}.    //    // @see rpcRequest.useCursorTracker    // @group rpcPrompt    // @visibility external    //<    useCursorTracker: isc.Browser.isSafari || (isc.Browser.isMoz && isc.Browser.geckoVersion < 20051111),    cursorTrackerConstructor: "Img",    cursorTrackerDefaults: {        src : isc.Page.getSkinDir()+"/images/shared/progressCursorTracker.png",        size: 16,        offsetX: 12,        offsetY: 0,        _updatePosition : function () {            this.setLeft(isc.EH.getX()+this.offsetX);            this.setTop(isc.EH.getY()+this.offsetY);        },        initWidget : function () {            this.Super("initWidget", arguments);            this._updatePosition();            this._updateEvent = isc.Page.setEvent("mouseMove", this.getID()+"._updatePosition()");                        this.bringToFront();        },        destroy : function () {            isc.Page.clearEvent("mouseMove", this._updateEvent);            this.Super("destroy", arguments);        }    },    //> @classAttr  RPCManager.promptCursor   (String : browser-dependent : IRW)    // Controls the default cursor shown when +link{rpcManager.promptStyle} is set to    // <code>"cursor"</code>.  Overrideable by +link{attr:rpcRequest.promptCursor}.    // <p>    // In Safari, IE 5.5 and Firefox 1.0 the default value is "wait", on all other platforms it is    // "progress".  The reason for this split is that the above-mentioned browsers do not support    // CSS2.1 - which is required for the "progress" cursor type.    //    // @visibility external    // @see attr:rpcRequest.promptCursor    // @group rpcPrompt    //<    // FF1.0, Safari don't support CSS2.1, so must use 'wait' - otherwise 'progress'    promptCursor: isc.Browser.isSafari ||         (isc.Browser.isMoz && isc.Browser.geckoVersion < 20051111) ||         (isc.Browser.isIE && isc.Browser.minorVersion <= 5.5) ? "wait" : "progress",    //> @classAttr  RPCManager.fetchDataPrompt  (string : "Finding Records that match your criteria..." : IRW)    // Default prompt displayed to the user while an operation is running to fetch data from    // the server.<br>    // Displayed as a result of +link{ListGrid.filterData()}, +link{ListGrid.fetchData()} and    // +link{ListGrid.clearCriteria()} code paths.    // @visibility external    // @group i18nMessages    //<	fetchDataPrompt:"Finding records that match your criteria...",            // Hidden prompts (not currently used by any exposed code path)    // ---------------------------------------------------------------        getViewRecordsPrompt:"Loading record...",    	    //> @classAttr RPCManager.showPrompt (boolean : RPCManager.showPrompt : RW)    //     // If set to <code>true</code>, the RPCManager will block the UI with a modal dialog containing    // the text from RPCManager.defaultPrompt (or the per-RPCRequest override) until the RPC to the    // server completes.    // <br><br>    // If set to <code>false</code>, the RPC happens transparently, allowing the user to continue    // interacting with the UI    //    // @see classAttr:RPCManager.defaultPrompt    // @see attr:rpcRequest.showPrompt    // @group rpcPrompt    // @visibility external    //<    showPrompt: false,        neverShowPrompt: false,    //> @classAttr RPCManager.actionURL (URL : RPCManager.actionURL : RW)    //    // The actionURL specifies the URL to which the RPC request will be sent.  Note that if you    // override this global default and your application uses DataSource databound components,    // you'll need to dispatch the DataSource requests from your RPC handler.  Your other option is    // to specify a url on a per-request basis.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -