Yahoo! UI Library

DataSource Utility  2.6.0

Yahoo! UI Library > datasource > YAHOO.util.ScriptNodeDataSource

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>=callbackFunction
Default Value: "callback"

Methods

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 © 2008 Yahoo! Inc. All rights reserved.