new tart.components.models.RemoteModel()
Remote Model
Extends
Members
-
entityClass
-
RemoteModel's entity class. Default value is undefined.
-
url
-
RemoteModel's request url. Default value is undefined.
Methods
-
inherited 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 . -
inherited 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. -
inherited getTotalItemCount(){number}
-
Get total item count
Returns:
Type Description number total item count for this model. -
load(opt_callback)
-
Load data and map data to entity.
Name Type Description opt_callbackfunction optional method to call after load.
-
protectedmapDataToEntities(xhrData)
-
map data to entity class.
Name Type Description xhrDataObject data returned from xhr request.
-
inherited setItems(items)
-
Setter for items
Name Type Description itemsObject items to be set.
-
inherited setTotalItemCount(itemCount)
-
Set total item count
Name Type Description itemCountnumber total item count for this model.