TSUI.Data
Extends: DataAccessor
Implements: None
Exported: Yes

Associated source files:

Description

A basic data accessor which can use a JS global variable as its source for pull/push. Can also use a property method e.g. function(value: Val_Type): Val_Type
Data accessors push or pull data to/from a data source such as a page on a web server.

Constructors

constructor(aContext: any)
Creates a new DataAccessor.
  • aContext: any -
constructor(aContext: any, baseAccessInfo: Data.IAccessInfo)
Creates a new DataAccessor with specified BaseAccessInfo.Set the URL value of the access info to the name of the global variable.Set Params to sub-propeties of the global variable.
  • aContext: any -
  • baseAccessInfo: Data.IAccessInfo -
constructor(aContext: any, baseAccessInfo?: Data.IAccessInfo)
  • aContext: any -
  • OPTIONAL baseAccessInfo: Data.IAccessInfo -


Public Properties

Context: any;
The context object to use when accessing the object.


Public Methods

PullData(accessInfo?: Data.IAccessInfo): Data.IDataAccessResult<I>
HTTP request implementation of PullData.
  • OPTIONAL accessInfo: Data.IAccessInfo - The AccessInfo to use for the data source.
  • Returns: TSUI.Data.IDataAccessResult<I> - Will return an initially empty result with status Error and no data or Complete and the data.
PushData(data: I, accessInfo?: Data.IAccessInfo): Data.IDataAccessResult<I>
HTTP request implementation of PushData.
  • data: I - The data to push to the source variable.
  • OPTIONAL accessInfo: Data.IAccessInfo - The AccessInfo to use for the data source. See constructor for more info on how to set this.
  • Returns: TSUI.Data.IDataAccessResult<I> - Will return an initially empty result with status Error and no data or Complete and the data.
getVal(accessInfo: Data.IAccessInfo): I
  • accessInfo: Data.IAccessInfo -
  • Returns: I -
setVal(accessInfo: Data.IAccessInfo, data: I): I
  • accessInfo: Data.IAccessInfo -
  • data: I -
  • Returns: I -


Last edited Sep 2, 2013 at 8:30 PM by EdwardNutting, version 1

Comments

No comments yet.