TSUI.Data
Extends: None
Exported: Yes

Associated source files:

Description

Defines the structure for a data binding. Data bindings bind a particular Control's property to a data source and handle pull / pushing data to/from that source.
I: Specifies the type of data sent/received to/from the server.
O: Specifies the type of data out of the data adapter.

Public Properties

Adapter: Data.IDataAdapter<I, O>;
The data adapter to use for this binding.
BindingDirection: Data.BindingDirections;
The binding direction to use for this binding.
DataProperty: TSUI.Collections.IList<string>;
A list of property names (in increasing depth order) that specify what property of the data from the adapter to bind to.
DelayMode: Data.DelayModes;
The Update Delay Mode to use for this binding.
OnUpdateFromSource: TSUI.Events.UpdateFromSourceEvent<I, O>;
Fired when the binding updates from the source.
OnUpdateFromUser: TSUI.Events.UpdateFromUserEvent<I, O>;
Fired when the binding updates from the user.
UpdateDelayTime: number;
Time to delay between sending access requests to the server to reduce network usage and JS overload. Useful for data bindings such as those bound to text boxes.


Public Methods

Accessor(value?: Data.IDataAccessor<I>): Data.IDataAccessor<I>
The data accessor to use for this binding.
  • OPTIONAL value: Data.IDataAccessor<I> -
  • Returns: TSUI.Data.IDataAccessor<I> -
Bind(): boolean
Wraps the property (method) in a special controlled method, maintaining a copy of the original.
  • Returns: boolean -
Control(value?: TSUI.UI.IControl): TSUI.UI.IControl
The control to bind.
  • OPTIONAL value: TSUI.UI.IControl -
  • Returns: TSUI.UI.IControl -
PropertyName(value?: string): string
The name of the method to call to set the control property.
  • OPTIONAL value: string -
  • Returns: string -
Unbind(): boolean
Unwraps the property (method).
  • Returns: boolean -
Update(): boolean
Causes the data binding to update using the direction specified in BindingDirection.
  • Returns: boolean - A boolean indicating whether the update was successful or not.
UpdateFromSource(): boolean
Causes the data binding to update from the source.
  • Returns: boolean - A boolean indicating whether the update was successful or not.
UpdateFromUser(): boolean
Causes the data binding to update from the user.
  • Returns: boolean - A boolean indicating whether the update was successful or not.


Last edited Aug 29, 2013 at 10:35 PM by EdwardNutting, version 2

Comments

No comments yet.