datasource-scriptnode.js revision 1e0aa6df8881a856ec262f103bfee1c0a05d19b9
///////////////////////////////////////////////////////////////////////////// // DataSource.ScriptNode static properties ///////////////////////////////////////////////////////////////////////////// * @value "dataSourceScriptNode" NAME:
"dataSourceScriptNode",
///////////////////////////////////////////////////////////////////////////// // DataSource.ScriptNode Attributes ///////////////////////////////////////////////////////////////////////////// * Pointer to Get Utility. * <!--<dt>queueRequests</dt> * <dd>If a request is already in progress, wait until response is returned before sending the next request.</dd> * <dt>cancelStaleRequests</dt> * <dd>If a request is already in progress, cancel it before sending the next request.</dd>--> * <dt>ignoreStaleResponses</dt> * <dd>Send all requests, but handle only the response for the most recently sent request.</dd> * <dd>Send all requests and handle all responses.</dd> * Callback string parameter name sent to the remote script. By default, * <URI>?<scriptCallbackParam>=callbackFunction * @property scriptCallbackParam * Creates a request callback that gets appended to the script URI. Implementers * can customize this string to match their server's query syntax. * @method generateRequestCallback * @return {String} String fragment that gets appended to script URI that * specifies the callback function return "&" +
self.
get(
"scriptCallbackParam") +
"=YUI.Env.DataSource.callbacks["+
id+
"]" ;
* Global array of callback functions, one for each request sent. * Unique ID to track requests. * Internal init() handler. * @param config {Object} Config object. * Passes query string to Get Utility. Fires <code>response</code> event when * response is received asynchronously. * @param e {Event.Facade} Event Facade with the following properties: * <dt>tId (Number)</dt> <dd>Unique transaction ID.</dd> * <dt>request (Object)</dt> <dd>The request.</dd> * <dt>callback (Object)</dt> <dd>The callback object with the following properties: * <dt>success (Function)</dt> <dd>Success handler.</dd> * <dt>failure (Function)</dt> <dd>Failure handler.</dd> * <dt>scope (Object)</dt> <dd>Execution context.</dd> * <dt>cfg (Object)</dt> <dd>Configuration object.</dd> // Dynamically add handler function with a closure to the callback stack if((
self.
get(
"asyncMode") !==
"ignoreStaleResponses")||
// We are now creating a request //uri = this.doBeforeGetScriptNode(sUri); // Works in Firefox only.... },
'@VERSION@' ,{
requires:[
'datasource-local',
'get']});