I think if there is an ExtJS method that I can load the store with data and after loading I Can I create my other components (custom panel) for displaying this data in my specific way in the panel?
I have a list of my custom components I want to display data from the store in the panels
You have two options: < Ol>
To copy the example of Datative (option 1):
Ext.define ('Image', {extension: 'Ext.data.Model ', Field: [{name:' src ', type:' string '}, {name:' caption ', type:' st ring '}]}); Ext.create ('Ext.data.Store', {id: 'imagesStore', Model: 'Image', Data: [[src: 'http: //www.sencha.com/img/20110215-feat-drawing Png ', Caption:' drawing and 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:' overhold theme '}, {src:' http: //www.sencha.com/img/20110215-feat-perf.png ', Caption:' display tune ')]}); Var imageTpl = New Ext.XTemplate ('& lt; tpl for = "." & Gt;', '& lt; div style = "margin-down: 10px;" class = "thumb-wrap">, '& Lt; img Src = "{src}" />,' & lt; span & gt; {caption} & lt; / span & gt; & # 39; & # 39; & lt; ; / Div & gt; ',' & lt; / tpl & gt;); Ext.create ('Ext.view.View', {store: Ext.data.StoreManager.lookup ('imagesStore'), tpl: imageTpl, item selector: 'div.thumb-wrap', empty text: 'No image available No ', RenderTo: Ext.getBody ()});
No comments:
Post a Comment