new tart.base.Model()
Base model
Extends
- goog.events.EventTarget
Methods
-
dispatchEvent(modelEvent){boolean}
-
Overriding goog.events.EventTarget's dispatchEvent method, to make this event consistent in application
Name Type Description modelEventObject | string event object which has type, oldValue and newValue fields.
Returns:
Type Description boolean . -
getItems(dispatchEvent){Object}
-
getter for items
Name Type Description dispatchEventboolean optional Whether this method should throw an event when its items are loaded. This may be used in classes that extend tart.base.Model.
Returns:
Type Description Object items all items. -
getTotalItemCount(){number}
-
Get total item count
Returns:
Type Description number total item count for this model. -
load(opt_callback)
-
Abstract method to load data from any resource
Name Type Description opt_callbackfunction optional method after load.
-
setItems(items)
-
Setter for items
Name Type Description itemsObject items to be set.
-
setTotalItemCount(itemCount)
-
Set total item count
Name Type Description itemCountnumber total item count for this model.
Type Definitions
-
tart.base.Model.EventObject
-