Properties Methods Events Config Options Direct Link
Observable
  Component
    Component
      DataView
        List

Class Ext.List

Package:Ext
Defined In:List.js
Class:List
Extends:DataView

A mechanism for displaying data using a list layout template. List uses an Ext.XTemplate as its internal templating mechanism, and is bound to an Ext.data.Store so that as the data in the store changes the view is automatically updated to reflect the changes.

The view also provides built-in behavior for many common events that can occur for its contained items including itemtap, containertap, etc. as well as a built-in selection model. In order to use these features, an itemSelector config must be provided for the DataView to determine what nodes it will be working with.

Useful Properties

Useful Methods

Useful Events

Screenshot:

Example code:

Ext.regModel('Contact', {
    fields: ['firstName', 'lastName']
});

var store = new Ext.data.JsonStore({
    model  : 'Contact',
    sorters: 'lastName',

    getGroupString : function(record) {
        return record.get('lastName')[0];
    },

    data: [
        {firstName: 'Tommy',   lastName: 'Maintz'},
        {firstName: 'Rob',     lastName: 'Dougan'},
        {firstName: 'Ed',      lastName: 'Spencer'},
        {firstName: 'Jamie',   lastName: 'Avins'},
        {firstName: 'Aaron',   lastName: 'Conran'},
        {firstName: 'Dave',    lastName: 'Kaneda'},
        {firstName: 'Michael', lastName: 'Mullany'},
        {firstName: 'Abraham', lastName: 'Elias'},
        {firstName: 'Jay',     lastName: 'Robinson'}
    ]
});

var list = new Ext.List({
    fullscreen: true,
    
    itemTpl : '{firstName} {lastName}',
    grouped : true,
    indexBar: true,
    
    store: store
});
list.show();

Config Options

Config OptionsDefined By
 centered : Boolean
Center the Component. Defaults to false.
Component
 clearSelectionOnDeactivate : Boolean
True to clear any selections on the list when the list is deactivated (defaults to true).
List
 componentCls : String
CSS Class to be added to a components root level element to give distinction to it via styling.
Component
 data : Mixed
The initial set of data to apply to the tpl to update the content area of the Component.
Component
 deferEmptyText : Boolean
True to defer emptyText being applied until the store's first load
DataView
 disabled : Boolean
Defaults to false.
Component
 disabledCls : String
CSS class to add when the Component is disabled. Defaults to 'x-item-disabled'.
Component
 draggable : Boolean
Allows the component to be dragged via the touch event.
Component
 emptyText : String
The text to display in the view when there is no data to display (defaults to '').
DataView
 floating : Boolean
Create the Component as a floating and use absolute positioning. Defaults to false.
Component
 floatingCls : Boolean
The class that is being added to this component when its floating. (defaults to x-floating)
Component
 height : Number
The height of this component in pixels.
Component
 hidden : Boolean
Defaults to false.
Component
 itemSelector : String
DataView
 monitorOrientation : Boolean
Monitor Orientation change
Component
 overItemCls : String
A CSS class to apply to each item in the view on mouseover (defaults to undefined).
DataView
 pressedCls : String
A CSS class to apply to an item on the view while it is being pressed (defaults to 'x-item-pressed').
DataView
 selectedItemCls : String
A CSS class to apply to each selected item in the view (defaults to 'x-view-selected').
DataView
 stopMaskTapEvent : Boolean
True to stop the event that fires when you click outside the floating component. Defalts to true.
Component
 store : Ext.data.Store
DataView
 styleHtmlCls : String
The class that is added to the content target when you set styleHtmlContent to true. Defaults to 'x-html'
Component
 tpl : String/Array
DataView
 trackOver : Boolean
True to enable mouseenter and mouseleave events
DataView
 triggerEvent : String
Defaults to 'singletap'. Other valid options are 'tap'
DataView
 width : Number
The width of this component in pixels.
Component

Public Properties

PropertyDefined By
 draggable : Boolean
Read-only property indicating whether or not the component can be dragged
Component
 rendered : Boolean
Read-only property indicating whether or not the component has been rendered.
Component

Public Methods

MethodDefined By

Public Events

EventDefined By