| Previous | Next | Frames | No Frames |
| Summary: Field | Property | Contructor | Method | Detail: Field | Property | Contructor | Method |
Object
|
+--xp.system.DispatcherObject
|
+--xp.data.ItemDataSource
Field Summary | ||
| public static | classInfo: Object | |
| A static class information object | ||
| public | dataSourceBinding: Object | |
| The collection of bindings | ||
| public | id: String | |
| The name of this datasource | ||
| public | name: String | |
| The name of this datasource | ||
| public | readOnly: Boolean | |
| Controls whether the datasource is read only | ||
| ||
Property Summary | ||
| public | currentItem: Object (read-only) | |
| Get the current data item encapsulated by this datasource | ||
| public | data: Object (read, write) | |
| Get or set the data object encapsulated by this datasource | ||
| public | isEmpty: Boolean (read-only) | |
| Returns true if this datasource contains data | ||
| public | length: Number (read-only) | |
| The number of records in the datasource | ||
Constructor | ||
| public | ItemDataSource ( dataItem: Object) | |
| Create a new instance | ||
Method Summary | ||
| public | addBinding ( bind: Object, isDataBound: Boolean ): Object | |
| Add a binding to this control | ||
| public | getBinding ( property: String ): Object | |
| Returns the binding object for a given property | ||
| public | getClass ( ): Function | |
| Returns a reference to the components static class | ||
| public | refresh ( ): Void | |
| Refresh the data | ||
| public | updateViews ( eventName: String ): Void | |
| Dispatches the modelChanged event to all listeners | ||
| ||
| public static var classInfo: Object |
| A static class information object Every class has an associated classInfo object that holds the version and other static information. The classInfo can be accessed either directly by referencing the static class or by calling getClass() on any class instance. |
| public var dataSourceBinding: Object |
| The collection of bindings |
| public var id: String |
| The name of this datasource |
| public var name: String |
| The name of this datasource |
| public var readOnly: Boolean |
| Controls whether the datasource is read only |
|
| Get the current data item encapsulated by this datasource |
|
| Get or set the data object encapsulated by this datasource |
|
| Returns true if this datasource contains data |
|
| The number of records in the datasource |
|
| Create a new instance | |||
|
|
| Add a binding to this control | ||||||
|
|
| Returns the binding object for a given property | |||
|
|
| Returns a reference to the components static class |
|
| Refresh the data Not implemented in the base class, we dont know how to refresh ourselves. |
|
| Dispatches the modelChanged event to all listeners | |||
|
SubClasses like DataSource lets you manipulate the data item through insert, update and delete.
SubClasses like ListDataSource lets you work with data as collections of objects.
A ItemDataSource can be bound to the currentItem of another IDataSource to create simple master/detail relationships.
A DataSource is somewhat similar to a DataHolder.
Event summary for the ItemDataSource class
The following table lists events of the ItemDataSource class.