LoadOnDemandSettings
Constructor Summary
| Public Constructor | ||
| public |
constructor(ownerObject: object, options: object) |
|
Member Summary
| Private Members | ||
| private |
_hasChildren: * |
|
| private |
|
|
| private |
_ownerObject: * |
|
Method Summary
| Public Methods | ||
| public |
Gets the owner object. |
|
| public |
hasChildren(dataItem: object): boolean Returns a boolean indicating whether the passed data item has children. |
|
| public |
Returns a boolean indicating whether load-on-demand is enabled or not. |
|
| public |
loadChildren(data: *, processData: *): * Load the children for a given data object. |
|
| public |
setHasChildrenMethod(newHasChildrenMethod: hasChildrenCallBack): object Sets the hasChildren callback function, used to determine whether a node or data item has children or not. |
|
| public |
setLoadChildrenMethod(newLoadChildrenMethod: loadChildrenCallBack): object Sets the loadChildren callback function, used to load children data items for a node. |
|
| public |
Validates whether the provided settings are correct or not. |
|
Public Constructors
public constructor(ownerObject: object, options: object) source
Params:
| Name | Type | Attribute | Description |
| ownerObject | object | The owner object. |
|
| options | object | The options object. |
|
| options.hasChildren | hasChildrenCallBack | Sets the hasChildren callback function, used to determine whether a node or data item has children or not. |
|
| options.loadChildren | loadChildrenCallBack | the loadChildren callback function, used to load children data items for a node. |
Private Members
private _hasChildren: * source
private _loadChildren: * source
private _ownerObject: * source
Public Methods
public hasChildren(dataItem: object): boolean source
Returns a boolean indicating whether the passed data item has children.
Params:
| Name | Type | Attribute | Description |
| dataItem | object | The data item to check if it has children or not. |
public isEnabled(): boolean source
Returns a boolean indicating whether load-on-demand is enabled or not.
public loadChildren(data: *, processData: *): * source
Load the children for a given data object.
Params:
| Name | Type | Attribute | Description |
| data | * | The data item, which should be used to load the children of the data item via AJAX. |
|
| processData | * | Callback function to process the children data items. |
Return:
| * |
public setHasChildrenMethod(newHasChildrenMethod: hasChildrenCallBack): object source
Sets the hasChildren callback function, used to determine whether a node or data item has children or not.
Params:
| Name | Type | Attribute | Description |
| newHasChildrenMethod | hasChildrenCallBack |
