Name

datasource (LzDatasource) — An abstract class to represent backend data sources.

Synopsis

LZX: datasource
JavaScript: LzDatasource
Type: Class
Access: public
Topic: LFC.Data
Declared in: WEB-INF/lps/lfc/data/LzDatasource.lzs

Description

LzDatasource is an abstract class that can be extended to create new kinds of datasources, such as Javadatasource and HTTPdatasource. These datasources are the client's representation of a backend entity. There is no tag that corresponds to this class.

Datasources represent queryable server-side Datasources, capable of creating or changing Datasets. Datasources are type-specific, i.e. http, jdbc or soap. Datasources manage connections to the server, handle timeouts and send ondata and onerror events.

In addition to any fields documented in the section below, these fields are also available: src String: The http request to make for the datasource. timeout Number: Interval (in milliseconds) to wait for response before timing out on request. Default 30000.

In addition to any events documented in the section below, these events are also available: ontimeout: Sent when a request from one of the datasource's datasets times out. onerror: Sent when an error occurs for this datasource. ondata: Sent when new data arrives for this datasource.

Superclass Chain

node (LzNode) » datasource (LzDatasource)

Known Subclasses

Known Direct Subclasses: connectiondatasource (LzConnectionDatasource) (as2), datasource (LzHTTPDatasource)

Details

Properties (1)

proxied
<attribute name="proxied" type="booleanLiteral | "inherit"" value="inherit" />
public var proxied : String = null;

Methods (7)

abortLoadForDataset()
<method name="abortLoadForDataset" args="forset" />
protected function abortLoadForDataset(forset : LzDataset);
Interrupts any load in progress for the given dataset.
getLoaderForDataset()
<method name="getLoaderForDataset" args="dataset, proxied" />
protected function getLoaderForDataset(dataset : LzDataset, proxied : Boolean) : LzHTTPLoader;
Returns a new loader for the given dataset. The returned object supports a "request" method which can be used to make backend requests.
getLoadTimeForDataset()
<method name="getLoadTimeForDataset" args="forset" />
public function getLoadTimeForDataset(forset : LzDataset) : Number;
Returns the amount of time it took the given datset to load
loadError()
<method name="loadError" args="loader, data" />
public function loadError(loader, data);
loadSuccess()
<method name="loadSuccess" args="loader, data" />
public function loadSuccess(loader, data);
loadTimeout()
<method name="loadTimeout" args="loader, data" />
public function loadTimeout(loader, data);
toString()
<method name="toString" />
private function toString();
Get string representation

LZX Synopsis

<class name="LzDatasource" extends=" LzNode ">
  <attribute name=" proxied " type="booleanLiteral | "inherit"" value="inherit" />
  <method name=" abortLoadForDataset " args="forset" />
  <method name=" getLoaderForDataset " args="dataset, proxied" />
  <method name=" getLoadTimeForDataset " args="forset" />
  <method name=" loadError " args="loader, data" />
  <method name=" loadSuccess " args="loader, data" />
  <method name=" loadTimeout " args="loader, data" />
  <method name=" toString " />
</class>

JavaScript Synopsis

public LzDatasource extends  LzNode  {
  public var proxied  : String = null;
  prototype protected function abortLoadForDataset (forset : LzDataset);
  prototype protected function getLoaderForDataset (dataset : LzDataset, proxied : Boolean) : LzHTTPLoader;
  prototype public function getLoadTimeForDataset (forset : LzDataset) : Number;
  prototype public function loadError (loader, data);
  prototype public function loadSuccess (loader, data);
  prototype public function loadTimeout (loader, data);
  prototype private function toString ();
}