Clear Up
SharpKit Reference

AbstractView Class

NOTE This is a private utility class for internal use by the framework. Don't rely on its existence.

This is an abstract superclass and should not be used directly. Please see Ext.view.View.

Namespace: Ext.view

Derived Types

Methods

Name Description
bindStore(Store) Changes the data store bound to this view and refreshes it.
bindStore(object, object) Binds a store to this instance.
bindStoreListeners(AbstractStore) Binds listeners for this component to the store. By default it will add anything bound by the getStoreListeners method, however it can be overridden in a subclass to provide any more complicated handling.
clearSelections() Deselects all selected records.

This method has been deprecated since 4.0

Use Ext.selection.Model.deselectAll instead.

collectData(JsArray<T>, JsNumber) Function which can be overridden which returns the data object passed to this DataView's template to render the whole DataView. This is usually an Array of data objects, each element of which is processed by an XTemplate which uses '<tpl for=".">' to iterate over its supplied data object as an Array. However, named properties may be placed into the data object to provide non-repeating data such as headings, totals etc.
deselect(object, object) Deselects a record instance by record instance or index.
findItemByChild(object) Returns the template node the passed child belongs to, or null if it doesn't belong to one.
findTargetByEvent(EventObject) Returns the template node by the Ext.EventObject or null if it is not found.
getNode(object) Gets a template node.
getNodes(object, object) Gets a range nodes.
getRecord(object) Gets a record from a node
getRecords(object) Gets an array of the records from an array of nodes
getSelectedNodes() Gets the currently selected nodes.
getSelectedRecords() Gets an array of the selected records

This method has been deprecated since 4.0

Use Ext.selection.Model.getSelection instead.

getSelectionCount() Gets the number of selected nodes.

This method has been deprecated since 4.0

Use Ext.selection.Model.getCount instead.

getSelectionModel() Gets the selection model for this view.
getStore() Returns the store associated with this DataView.
getStoreListeners() Gets the listeners to bind to a new store.
indexOf(object) Finds the index of the passed node.
isSelected(object) Returns true if the passed node is selected, else false.
onBindStore(AbstractStore, bool) Template method, it is called when a new store is bound to the current instance.
onUnbindStore(AbstractStore, bool) Template method, it is called when an existing store is unbound from the current instance.
prepareData(object, JsNumber, Model) Function which can be overridden to provide custom formatting for each Record that is used by this DataView's template to render each node.
refresh() Refreshes the view by reloading the data from the store and re-rendering the template.
refreshNode(JsNumber) Refreshes an individual node's data from the store.
select(object, bool, object) Selects a record instance by record instance or index.

This method has been deprecated since 4.0

Use Ext.selection.Model.select instead.

unbindStoreListeners(AbstractStore) Unbinds listeners from this component to the store. By default it will remove anything bound by the bindStoreListeners method, however it can be overridden in a subclass to provide any more complicated handling.

Fields

Name Description
blockRefresh Set this to true to ignore refresh events on the bound store. This is useful if you wish to provide custom transition animations via a plugin Defaults to: false
deferEmptyText True to defer emptyText being applied until the store's first load. Defaults to: true
deferInitialRefresh Defaults to true to defer the initial refresh of the view. This allows the View to execute its render and initial layout more quickly because the process will not be encumbered by the expensive update of the view structure. Important: Be aware that this will mean that the View's item elements will not be available immediately upon render, so selection may not take place at render time. To access a View's item elements as soon as possible, use the viewready event. Or set deferInitialrefresh to false, but this will be at the cost of slower rendering. Defaults to: true
disableSelection True to disable selection within the DataView. This configuration will lock the selection model that the DataView uses.
emptyText The text to display in the view when there is no data to display. Note that when using local data the emptyText will not be displayed unless you set the deferEmptyText option to false. Defaults to: ""
itemCls Specifies the class to be assigned to each element in the view when used in conjunction with the itemTpl configuration. Defaults to: "x-dataview-item"
itemSelector This is a required setting. A simple CSS selector (e.g. div.some-class or span:first-child) that will be used to determine what nodes this DataView will be working with. The itemSelector is used to map DOM nodes to records. As such, there should only be one root level element that matches the selector for each record.
itemTpl The inner portion of the item template to be rendered. Follows an XTemplate structure and will be placed inside of a tpl.
loadingCls The CSS class to apply to the loading message element. Defaults to Ext.LoadMask.prototype.msgCls "x-mask-loading".
loadingHeight If specified, gives an explicit height for the data view when it is showing the loadingText, if that is specified. This is useful to prevent the view's height from collapsing to zero when the loading mask is applied and there are no other contents in the data view.
loadingText A string to display during data load operations. If specified, this text will be displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's contents will continue to display normally until the new data is loaded and the contents are replaced. Defaults to: "Loading..."
loadingUseMsg Whether or not to use the loading message. Defaults to: true
loadMask False to disable a load mask from displaying while the view is loading. This can also be a Ext.LoadMask configuration object. Defaults to: true
multiSelect True to allow selection of more than one item at a time, false to allow selection of only a single item at a time or no selection at all, depending on the value of singleSelect. Defaults to: false

This cfg has been deprecated since 4.1.1

Use Ext.selection.Model.mode 'MULTI' instead.

overItemCls A CSS class to apply to each item in the view on mouseover. Setting this will automatically set trackOver to true.
preserveScrollOnRefresh =false True to preserve scroll position across refresh operations. Defaults to: false
selectedItemCls A CSS class to apply to each selected item in the view. Defaults to: "x-item-selected"
simpleSelect True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl, false to force the user to hold Ctrl or Shift to select more than on item. Defaults to: false

This cfg has been deprecated since 4.1.1

Use Ext.selection.Model.mode 'SIMPLE' instead.

singleSelect Allows selection of exactly one item at a time. As this is the default selection mode anyway, this config is completely ignored.

This cfg has been removed since 4.1.1

Use Ext.selection.Model.mode 'SINGLE' instead.

store The Ext.data.Store to bind this DataView to.
trackOver When true the overItemCls will be applied to rows when hovered over. This in return will also cause highlightitem and unhighlightitem events to be fired. Enabled automatically when the overItemCls config is set. Defaults to: false
© Copyright 2005-2011 SharpKit. All rights reserved.