1 <!DOCTYPE html><html><head><title>Sencha Documentation Project</title><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../prettify.css" type="text/css"><link rel="stylesheet" href="../prettify_sa.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script></head><body onload="prettyPrint()"><pre class="prettyprint"><pre><span id='Ext-view.BoundList'>/**
2 </span> * @class Ext.view.BoundList
3 * @extends Ext.view.View
4 * An internal used DataView for ComboBox, MultiSelect and ItemSelector.
6 Ext.define('Ext.view.BoundList', {
7 extend: 'Ext.view.View',
8 alias: 'widget.boundlist',
9 alternateClassName: 'Ext.BoundList',
10 requires: ['Ext.layout.component.BoundList', 'Ext.toolbar.Paging'],
12 <span id='Ext-view.BoundList-cfg-pageSize'> /**
13 </span> * @cfg {Number} pageSize If greater than <tt>0</tt>, a {@link Ext.toolbar.Paging} is displayed at the
14 * bottom of the list and store queries will execute with page start and
15 * {@link Ext.toolbar.Paging#pageSize limit} parameters.
19 <span id='Ext-view.BoundList-property-pagingToolbar'> /**
20 </span> * @property pagingToolbar
21 * @type {Ext.toolbar.Paging}
22 * A reference to the PagingToolbar instance in this view. Only populated if {@link #pageSize} is greater
23 * than zero and the BoundList has been rendered.
28 baseCls: Ext.baseCSSPrefix + 'boundlist',
36 componentLayout: 'boundlist',
38 renderTpl: ['<div class="list-ct"></div>'],
40 initComponent: function() {
43 itemCls = baseCls + '-item';
45 me.selectedItemCls = baseCls + '-selected';
46 me.overItemCls = baseCls + '-item-over';
47 me.itemSelector = "." + itemCls;
50 me.addCls(baseCls + '-floating');
53 // should be setting aria-posinset based on entire set of data
55 me.tpl = Ext.create('Ext.XTemplate',
56 '<ul><tpl for=".">',
57 '<li role="option" class="' + itemCls + '">' + me.getInnerTpl(me.displayField) + '</li>',
58 '</tpl></ul>'
62 me.pagingToolbar = me.createPagingToolbar();
67 Ext.applyIf(me.renderSelectors, {
72 createPagingToolbar: function() {
73 return Ext.widget('pagingtoolbar', {
74 pageSize: this.pageSize,
80 onRender: function() {
82 toolbar = me.pagingToolbar;
83 me.callParent(arguments);
85 toolbar.render(me.el);
89 bindStore : function(store, initial) {
91 toolbar = me.pagingToolbar;
92 me.callParent(arguments);
94 toolbar.bindStore(store, initial);
98 getTargetEl: function() {
99 return this.listEl || this.el;
102 getInnerTpl: function(displayField) {
103 return '{' + displayField + '}';
106 refresh: function() {
109 if (me.isVisible()) {
111 me.doComponentLayout();
116 initAria: function() {
119 var selModel = this.getSelectionModel(),
120 mode = selModel.getSelectionMode(),
121 actionEl = this.getActionEl();
123 // TODO: subscribe to mode changes or allow the selModel to manipulate this attribute.
124 if (mode !== 'SINGLE') {
125 actionEl.dom.setAttribute('aria-multiselectable', true);
129 onDestroy: function() {
130 Ext.destroyMembers(this, 'pagingToolbar', 'listEl');
134 </pre></pre></body></html>