javascript - extjs dataview not show images -


i want show pictures using dataview. have 1 model , 1 store url. problem simple, configured xtype: 'dataview' not works , dont show error. im doing wrong?

store:

ext.define('proyecto.store.st_pjdatos', {     extend: 'ext.data.store',     model: 'proyecto.model.md_pjdatos',  data: [     { idpersonaje: 1, nombre: 'aerie', retrato: 'http://img.picshare.at/1440990535_female_godlike_moon_jasonseow01_lg.png', arquetipo: 'neutral', profesion: 'mago', pv: 16, pa: 9, ps: 12, idatributos: 1 },     { idpersonaje: 2, nombre: 'tybalt', retrato: 'http://img.picshare.at/1440990535_male_human_jasonseow03_lg.png', arquetipo: 'neutral', profesion: 'picaro', pv: 21, pa: 18, ps: 19, idatributos: 2 },     { idpersonaje: 3, nombre: 'zojja', retrato: 'http://img.picshare.at/1440990535_n7bmtqw.png', arquetipo: 'maligno', profesion: 'clerigo', pv: 26, pa: 14, ps: 29, idatributos: 3 },     { idpersonaje: 4, nombre: 'arcturus', retrato: 'http://img.picshare.at/1440990535_poe_beaverskin02_lg.png', arquetipo: 'maligno', profesion: 'caballero', pv: 31, pa: 27, ps: 10, idatributos: 4 } ] }); 

model:

ext.define('proyecto.model.md_pjdatos', { extend: 'ext.data.model',  fields: [     { name: 'idpersonaje', type: 'int' },     { name: 'nombre', type: 'auto' },     { name: 'retrato', type: 'auto' },     { name: 'arquetipo', type: 'auto' },     { name: 'profesion', type: 'auto' },     { name: 'pv', type: 'int' },     { name: 'pa', type: 'int' },     { name: 'ps', type: 'int' },     { name: 'idatributos', reference: 'proyecto.model.md_pjatributos', unique: true }    ] }); 

mainview:

ext.define('proyecto.view.main.main', {     extend: 'ext.container.container',     requires: [         'proyecto.view.main.maincontroller',         'proyecto.view.main.mainmodel'     ],      xtype: 'app-main',      controller: 'main',     viewmodel: {         type: 'main'     },      layout: {         type: 'border'     },      items: [{         xtype: 'panel',         bind: {             title: '{name}'         },         region: 'west',         width: 250,         split: true,         items: [{             xtype: 'dataview',             store:  ext.data.storemanager.lookup('proyecto.model.md_pjdatos'),             tpl: [                 '<tpl for=".">',                     '<div class="thumb-wrap">',                         '<div class="thumb"><img src="{retrato}"></div>',                         '<span class="x-editable">{nombre}</span>',                     '</div>',                 '</tpl>'             ],             itemselector: 'div.thumb-wrap'          }],     },{         region: 'center',         xtype: 'tabpanel',         items:[{             title: 'tab 1',             html: '<h2>content appropriate current navigation.</h2>'         }]     }] }); 

the

first of all, passing model class name storemanager.lookup call, not store class name:

store:  ext.data.storemanager.lookup('proyecto.model.md_pjdatos') 

then, if passed store class name still not work because storemanager.lookup expects "the id of store, or store instance, or store configuration" not store class name.

replace storemanager.lookup call simply:

new proyecto.store.st_pjdatos 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -