Hello, i'm trying to reload a list , with my fresh records , but i don't succeed in doing this , someone could help me ?
i'm retrieve firstly my data from a Json proxy with associations, and i need to get this data in a list already created
here's the function called in my controller
Code:
refs:
{
main: 'navMainPanel',
fichePat :'fichePat1',
listPrest :'listePresta',
ajoutact :'AjoutActePanel',
histoActes:'histoTraitement',
test:'AgendaPanel'
},
var imgs = this.getTest();
imgs.setStore(record.get('docs'));
console.log(imgs);
my List
Code:
Ext.define('CWFSE.view.Agenda', {
extend:'Ext.List',
xtype:'AgendaPanel',
requires: [
'CWFSE.store.ImagerieStore'
],
config:{
title : 'Liste Images',
itemTpl: Ext.create('Ext.XTemplate',
'<table style="width:100%">',
'<tr><td style="width:50%"><img src={UPL_PATH} /></td>',
'<td style="width:50%">{UPL_NAME}</td>',
'</tr></table>'
),
store:{ xclass : 'CWFSE.store.ImagerieStore'}
},
listeners: {
itemtap: {
fn: function(view, index, item, e){
var rec = view.getStore().getAt(index);
console.log(rec);
var mysheet = new Ext.Sheet(
{
height:400,
layout:'vbox',
stretchX:true,
items:[
{
xtype:'container',
layout:'fit',
flex:1,
padding :10,
style:'color:#FFFFFF',
html: [
'<img src='+rec.get('UPL_PATH')+' width=50%/>'
].join("")
},
{
xtype:'button',
text:'fermer',
height:30,
width :100,
handler:function(){
this.up('sheet').hide();
}
}
],
listeners:{
hide:{
fn:function(){
this.destroy();
}
}
}
}
)
mysheet.show();
}
}
}
});