Yahoo! UI Library

DataSource Utility  2.8.0r4

Yahoo! UI Library > datasource > YAHOO.util.ScriptNodeDataSource
Search:
 
Filters

Class YAHOO.util.ScriptNodeDataSource - extends YAHOO.util.DataSourceBase

ScriptNodeDataSource class for accessing remote data via the YUI Get Utility.

Constructor

YAHOO.util.ScriptNodeDataSource ( oLiveData , oConfigs )
Parameters:
oLiveData <HTMLElement> Pointer to live data.
oConfigs <object> (optional) Object literal of configuration values.

Properties

_nId - private static Number

Unique ID to track requests.

_nPending - private static Number

Counter for pending requests. When this is 0, it is safe to purge callbacks array.

asyncMode - String

Defines request/response management in the following manner:
ignoreStaleResponses
Send all requests, but handle only the response for the most recently sent request.
allowAll
Send all requests and handle all responses.
Default Value: "allowAll"

callbacks - static Function[]

Global array of callback functions, one for each request sent.

getUtility - Object

Alias to YUI Get Utility, to allow implementers to use a custom class.
Default Value: YAHOO.util.Get

scriptCallbackParam - String

Callback string parameter name sent to the remote script. By default, requests are sent to <URI>?<scriptCallbackParam>=callback
Default Value: "callback"

Methods

doBeforeGetScriptNode

String doBeforeGetScriptNode ( URI )
Overridable method gives implementers access to modify the URI before the dynamic script node gets inserted. Implementers should take care not to return an invalid URI.
Parameters:
URI <String> to the script
Returns: String
URI to the script

generateRequestCallback

String generateRequestCallback ( )
Creates a request callback that gets appended to the script URI. Implementers can customize this string to match their server's query syntax.
Returns: String
String fragment that gets appended to script URI that specifies the callback function

makeConnection

Number makeConnection ( oRequest , oCallback , oCaller )
Overriding method passes query to Get Utility. The returned response is then forwarded to the handleResponse function.
Parameters:
oRequest <Object> Request object.
oCallback <Object> Callback object literal.
oCaller <Object> (deprecated) Use oCallback.scope.
Returns: Number
Transaction ID.


Copyright © 2009 Yahoo! Inc. All rights reserved.