X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..refs/heads/master:/docs/source/View3.html diff --git a/docs/source/View3.html b/docs/source/View3.html index 3caa8b1e..ae1c1f66 100644 --- a/docs/source/View3.html +++ b/docs/source/View3.html @@ -1,60 +1,74 @@ -
+ +/** - * @class Ext.view.View - * @extends Ext.view.AbstractView - * - * A mechanism for displaying data using custom layout templates and formatting. DataView uses an {@link Ext.XTemplate} - * as its internal templating mechanism, and is bound to an {@link 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 click, doubleclick, - * mouseover, mouseout, etc. as well as a built-in selection model. <b>In order to use these features, an {@link #itemSelector} - * config must be provided for the DataView to determine what nodes it will be working with.</b> + + + + +\ No newline at end of file +});The source code + + + + + + +/** + * A mechanism for displaying data using custom layout templates and formatting. * - * The example below binds a DataView to a {@link Ext.data.Store} and renders it into an {@link Ext.panel.Panel}. + * The View uses an {@link Ext.XTemplate} as its internal templating mechanism, and is bound to an + * {@link 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 click, doubleclick, mouseover, mouseout, etc. as well as a + * built-in selection model. **In order to use these features, an {@link #itemSelector} config must + * be provided for the DataView to determine what nodes it will be working with.** * - * {@img Ext.DataView/Ext.DataView.png Ext.DataView component} + * The example below binds a View to a {@link Ext.data.Store} and renders it into an {@link Ext.panel.Panel}. * - * Ext.regModel('Image', { - * Fields: [ - * {name:'src', type:'string'}, - * {name:'caption', type:'string'} + * @example + * Ext.define('Image', { + * extend: 'Ext.data.Model', + * fields: [ + * { name:'src', type:'string' }, + * { name:'caption', type:'string' } * ] * }); - * + * * Ext.create('Ext.data.Store', { * id:'imagesStore', * model: 'Image', * data: [ - * {src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts'}, - * {src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data'}, - * {src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme'}, - * {src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned'} + * { src:'http://www.sencha.com/img/20110215-feat-drawing.png', caption:'Drawing & Charts' }, + * { src:'http://www.sencha.com/img/20110215-feat-data.png', caption:'Advanced Data' }, + * { src:'http://www.sencha.com/img/20110215-feat-html5.png', caption:'Overhauled Theme' }, + * { src:'http://www.sencha.com/img/20110215-feat-perf.png', caption:'Performance Tuned' } * ] * }); - * + * * var imageTpl = new Ext.XTemplate( - * '<tpl for=".">', - * '<div style="thumb-wrap">', - * '<img src="{src}" />', - * '<br/><span>{caption}</span>', - * '</div>', - * '</tpl>' + * '<tpl for=".">', + * '<div style="margin-bottom: 10px;" class="thumb-wrap">', + * '<img src="{src}" />', + * '<br/><span>{caption}</span>', + * '</div>', + * '</tpl>' * ); - * - * Ext.create('Ext.DataView', { + * + * Ext.create('Ext.view.View', { * store: Ext.data.StoreManager.lookup('imagesStore'), * tpl: imageTpl, * itemSelector: 'div.thumb-wrap', * emptyText: 'No images available', * renderTo: Ext.getBody() * }); - * - * @xtype dataview */ Ext.define('Ext.view.View', { extend: 'Ext.view.AbstractView', - alternateClassName: 'Ext.view.View', + alternateClassName: 'Ext.DataView', alias: 'widget.dataview', - + inheritableStatics: { EventMap: { mousedown: 'MouseDown', @@ -66,13 +80,14 @@ Ext.define('Ext.view.View', { mouseout: 'MouseOut', mouseenter: 'MouseEnter', mouseleave: 'MouseLeave', - keydown: 'KeyDown' + keydown: 'KeyDown', + focus: 'Focus' } }, - + addCmpEvents: function() { this.addEvents( - /** + /** * @event beforeitemmousedown * Fires before the mousedown event on an item is processed. Returns false to cancel the default action. * @param {Ext.view.View} this @@ -82,7 +97,7 @@ Ext.define('Ext.view.View', { * @param {Ext.EventObject} e The raw event object */ 'beforeitemmousedown', - /** + /** * @event beforeitemmouseup * Fires before the mouseup event on an item is processed. Returns false to cancel the default action. * @param {Ext.view.View} this @@ -92,7 +107,7 @@ Ext.define('Ext.view.View', { * @param {Ext.EventObject} e The raw event object */ 'beforeitemmouseup', - /** + /** * @event beforeitemmouseenter * Fires before the mouseenter event on an item is processed. Returns false to cancel the default action. * @param {Ext.view.View} this @@ -102,7 +117,7 @@ Ext.define('Ext.view.View', { * @param {Ext.EventObject} e The raw event object */ 'beforeitemmouseenter', - /** + /** * @event beforeitemmouseleave * Fires before the mouseleave event on an item is processed. Returns false to cancel the default action. * @param {Ext.view.View} this @@ -112,7 +127,7 @@ Ext.define('Ext.view.View', { * @param {Ext.EventObject} e The raw event object */ 'beforeitemmouseleave', - /** + /** * @event beforeitemclick * Fires before the click event on an item is processed. Returns false to cancel the default action. * @param {Ext.view.View} this @@ -122,7 +137,7 @@ Ext.define('Ext.view.View', { * @param {Ext.EventObject} e The raw event object */ 'beforeitemclick', - /** + /** * @event beforeitemdblclick * Fires before the dblclick event on an item is processed. Returns false to cancel the default action. * @param {Ext.view.View} this @@ -132,7 +147,7 @@ Ext.define('Ext.view.View', { * @param {Ext.EventObject} e The raw event object */ 'beforeitemdblclick', -