Implementation of YAHOO.widget.DataSource using XML HTTP requests that return
query results.
|
ERROR_DATANULL : String |
DataSource |
<static> Error message for null data responses. |
|
ERROR_DATAPARSE : String |
DataSource |
<static> Error message for data responses with parsing errors. |
|
ERROR_DATAXHR : String |
DS_XHR |
<static> Error message for XHR failure. |
|
TYPE_FLAT : Number |
DS_XHR |
<static> Flat-file data type. |
|
TYPE_JSON : Number |
DS_XHR |
<static> JSON data type. |
|
TYPE_XML : Number |
DS_XHR |
<static> XML data type. |
|
connMgr : Object |
DS_XHR |
Alias to YUI Connection Manager. Allows implementers to specify their own
subclasses of the YUI Connection Manager ut... |
|
connTimeout : Number |
DS_XHR |
Number of milliseconds the XHR connection will wait for a server response. A
a value of zero indicates the XHR connec... |
|
maxCacheEntries : Number |
DataSource |
Max size of the local cache. Set to 0 to turn off caching. Caching is
useful to reduce the number of server connect... |
|
queryMatchCase : Boolean |
DataSource |
Enables query case-sensitivity matching. If caching is on and
queryMatchCase is true, queries will only return result... |
|
queryMatchContains : Boolean |
DataSource |
Use this to equate cache matching with the type of matching done by your live
data source. If caching is on and query... |
|
queryMatchSubset : Boolean |
DataSource |
Enables query subset matching. If caching is on and queryMatchSubset is
true, substrings of queries will return match... |
|
responseStripAfter : String |
DS_XHR |
String after which to strip results. If the results from the XHR are sent
back as HTML, the gzip HTML comment appears... |
|
responseType : String |
DS_XHR |
XHR response data type. Other types that may be defined are YAHOO.widget.DS_XHR.TYPE_XML
and YAHOO.widget.DS_XHR.TYPE... |
|
scriptQueryAppend : String |
DS_XHR |
String of key/value pairs to append to requests made to scriptURI. Define
this string when you want to send additiona... |
|
scriptQueryParam : String |
DS_XHR |
Query string parameter name sent to scriptURI. For instance, queries will be
sent to <scriptURI>?<scriptQ... |
|
scriptURI : String |
DS_XHR |
Absolute or relative URI to script that returns query results. For instance,
queries will be sent to <scriptURI... |
|
DS_XHR(sScriptURI {String} , aSchema {String[]} , [oConfigs {Object} ]) |
DS_XHR |
|
|
doQuery(oCallbackFn {HTMLFunction} , sQuery {String} , oParent {Object} ) : void |
DS_XHR |
Queries the live data source defined by scriptURI for results. Results are
passed back to a callback function. |
|
flushCache() : void |
DataSource |
Flushes cache. |
|
getResults(oCallbackFn {HTMLFunction} , sQuery {String} , oParent {Object} ) : void |
DataSource |
Retrieves query results, first checking the local cache, then making the
query request to the live data source as def... |
|
parseResponse(sQuery {String} , oResponse {Object} , oParent {Object} ) : s |
DS_XHR |
Parses raw response data into an array of result objects. The result data key
is always stashed in the [0] element of... |
|
toString() : String |
DataSource |
Public accessor to the unique name of the DataSource instance. |
|
cacheFlushEvent : (oSelf {Object} ) |
DataSource |
Fired when the local cache is flushed. |
|
cacheQueryEvent : (oSelf {Object} , oParent {Object} , sQuery {String} ) |
DataSource |
Fired when a query is made to the local cache. |
|
dataErrorEvent : (oSelf {Object} , oParent {Object} , sQuery {String} , sMsg {String} ) |
DataSource |
Fired when an error is encountered with the live data source. |
|
getCachedResultsEvent : (oSelf {Object} , oParent {Object} , sQuery {String} , aResults {Object[]} ) |
DataSource |
Fired when data is retrieved from the local cache. |
|
getResultsEvent : (oSelf {Object} , oParent {Object} , sQuery {String} , aResults {Object[]} ) |
DataSource |
Fired when data is retrieved from the live data source. |
|
queryEvent : (oSelf {Object} , oParent {Object} , sQuery {String} ) |
DataSource |
Fired when a query is made to the live data source. |
ERROR_DATANULL
public String ERROR_DATANULL
<static> Error message for null data responses.
ERROR_DATAPARSE
public String ERROR_DATAPARSE
<static> Error message for data responses with parsing errors.
ERROR_DATAXHR
public String ERROR_DATAXHR
<static> Error message for XHR failure.
This property is defined by DS_XHR.
TYPE_FLAT
public Number TYPE_FLAT
<static> Flat-file data type.
This property is defined by DS_XHR.
TYPE_JSON
public Number TYPE_JSON
<static> JSON data type.
This property is defined by DS_XHR.
TYPE_XML
public Number TYPE_XML
<static> XML data type.
This property is defined by DS_XHR.
connMgr
public Object connMgr
Alias to YUI Connection Manager. Allows implementers to specify their own
subclasses of the YUI Connection Manager utility.
This property is defined by DS_XHR.
connTimeout
public Number connTimeout
Number of milliseconds the XHR connection will wait for a server response. A
a value of zero indicates the XHR connection will wait forever. Any value
greater than zero will use the Connection utility's Auto-Abort feature.
This property is defined by DS_XHR.
maxCacheEntries
public Number maxCacheEntries
Max size of the local cache. Set to 0 to turn off caching. Caching is
useful to reduce the number of server connections. Recommended only for data
sources that return comprehensive results for queries or when stale data is
not an issue.
queryMatchCase
public Boolean queryMatchCase
Enables query case-sensitivity matching. If caching is on and
queryMatchCase is true, queries will only return results for case-sensitive
matches.
queryMatchContains
public Boolean queryMatchContains
Use this to equate cache matching with the type of matching done by your live
data source. If caching is on and queryMatchContains is true, the cache
returns results that "contain" the query string. By default,
queryMatchContains is set to false, meaning the cache only returns results
that "start with" the query string.
queryMatchSubset
public Boolean queryMatchSubset
Enables query subset matching. If caching is on and queryMatchSubset is
true, substrings of queries will return matching cached results. For
instance, if the first query is for "abc" susequent queries that start with
"abc", like "abcd", will be queried against the cache, and not the live data
source. Recommended only for DataSources that return comprehensive results
for queries with very few characters.
responseStripAfter
public String responseStripAfter
String after which to strip results. If the results from the XHR are sent
back as HTML, the gzip HTML comment appears at the end of the data and should
be ignored.
This property is defined by DS_XHR.
responseType
public String responseType
XHR response data type. Other types that may be defined are YAHOO.widget.DS_XHR.TYPE_XML
and YAHOO.widget.DS_XHR.TYPE_FLAT.
This property is defined by DS_XHR.
scriptQueryAppend
public String scriptQueryAppend
String of key/value pairs to append to requests made to scriptURI. Define
this string when you want to send additional query parameters to your script.
When defined, queries will be sent to
<scriptURI>?<scriptQueryParam>=userinput&<scriptQueryAppend>
This property is defined by DS_XHR.
scriptQueryParam
public String scriptQueryParam
Query string parameter name sent to scriptURI. For instance, queries will be
sent to <scriptURI>?<scriptQueryParam>=userinput
This property is defined by DS_XHR.
scriptURI
public String scriptURI
Absolute or relative URI to script that returns query results. For instance,
queries will be sent to <scriptURI>?<scriptQueryParam>=userinput
This property is defined by DS_XHR.