PDA

View Full Version : List problem, don't give data



myput
20 Oct 2011, 7:19 AM
Hey,
I have a problem with my list.
I have a list with an itemtap function, and the record don't want to go to the itemtap function ...
I get my data from store where i set data:


Ext.regModel('WPApp.models.SearchDirectoryListPanelModel', {
fields: [
{name: 'id', type: 'int'},
{name: 'name', type: 'string'},
{name: 'idCategory', type: 'string'},
]
});


WPApp.stores.ResultPanelListStore = new Ext.data.JsonStore({
model : 'WPApp.models.SearchDirectoryListPanelModel',
setObj: function (JsonObj) {
this.JsonObj = JsonObj;
WPApp.stores.DirectoryItemListListStore.load({data: this.JsonObj});
}
});


And the list:


WPApp.views.ResultPanelList = Ext.extend(Ext.List,{
fullscreen: true,
scroll: 'vertical',
itemTpl: loadURL(WPApp.config.host + WPApp.config.SearchTPL + 'SearchDirectoryListPanel.html'),
itemSelector: 'div.SearchDirectoryListPanel',
singleSelect: true,
store: WPApp.stores.ResultPanelListStore,
listeners: {
itemtap: function(view, index) {
var record = WPApp.views.ResultPanelList.getStore().getAt(index);
alert(record);
}
}
});

The data are good, i can display in the TPL ... and the JSON data string is good too ...

Have you an idea please?

myput
24 Oct 2011, 12:10 AM
:( Bump please