Yahoo! UI Library

datasource  3.0.0

Yahoo! UI Library > datasource > DataSource.Get
Search:
 
Filters

Class DataSource.Get - extends DataSource.Local

Get Utility subclass for the DataSource Utility.

Constructor

DataSource.Get ( )

Properties

_tId - private static Number

Unique ID to track requests.

callbacks - static Function[]

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

NAME - static final String

Class name.

Properties inherited from Attribute:

Properties inherited from Base:

Properties inherited from DataSource.Local:

Methods

_defRequestFn

protected void _defRequestFn ( e )
Passes query string to Get Utility. Fires response event when response is received asynchronously.
Parameters:
e <Event.Facade> Event Facade with the following properties:
tId (Number)
Unique transaction ID.
request (Object)
The request.
callback (Object)
The callback object with the following properties:
success (Function)
Success handler.
failure (Function)
Failure handler.
cfg (Object)
Configuration object.

Events

asyncModeChange

asyncModeChange ( event )
Fires when the value for the configuration attribute 'asyncMode' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

generateRequestCallbackChange

generateRequestCallbackChange ( event )
Fires when the value for the configuration attribute 'generateRequestCallback' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

getChange

getChange ( event )
Fires when the value for the configuration attribute 'get' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

scriptCallbackParamChange

scriptCallbackParamChange ( event )
Fires when the value for the configuration attribute 'scriptCallbackParam' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

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"

generateRequestCallback - Function

Accepts the DataSource instance and a callback ID, and returns a callback param/value string that gets appended to the script URI. Implementers can customize this string to match their server's query syntax.

get - Y.Get

Pointer to Get Utility.
Default Value: Y.Get

scriptCallbackParam - String

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

Configuration attributes inherited from Base:

Configuration attributes inherited from DataSource.Local:


Copyright © 2009 Yahoo! Inc. All rights reserved.