PDA

View Full Version : Problem displaying a list after upgrading from 0.93 to 0.96



lteti77
4 Oct 2010, 1:15 PM
Hi, i have a problem after upgrading to 0.96.
I have a panel called 'contentPanel' with a card layout and several lists. clicking on 1 item in a list activates the next card.
after upgrading to 0.96, i had to set 'fullscreen' to 'true' in order to display the lists.
now some lists display correctly and some other don't display at all.
i can't understand why, because i set the same properties for each list...

what is changed in Lists from 0.93 to 0.96?

here's two of the lists i defined... the first works and the second doesn't...



this.groupsList = new Ext.List({
fullscreen: true,
id: 'groupsList',
store: this.groupStore,
tpl: '<tpl for="."><div class="group-item"><div class="group-item-name">{sDescrizione}</div></div></tpl>',
itemSelector: 'div.group-item',
singleSelect: true,
grouped: false,
indexBar: false,
emptyText: 'Non ci sono elementi per l\'elemento selezionato',
disclosure: {
scope: this,
handler: function(record, btn, index) {
var gStore = Ext.getCmp('groupsList').getStore();
var bIsSubscribed = gStore.getAt(index).get('bIsSubscribed');
if(bIsSubscribed=='false') {
Ext.getCmp('contentPanel').setCard(Ext.getCmp('infoPanel'),'slide');
} else {
Ext.getCmp('contentPanel').setCard(Ext.getCmp('drugsList'));
}
},
listeners: {
scope: this,
itemtap: function(list, index) {
//todo: add code to handle itemtap...
}
},
dockedItems: [{
title: 'Gruppi',
xtype: 'toolbar',
dock: 'top'
}]
});

this.drugsList = new Ext.List({
fullscreen: true,
id: 'drugsList',
store: this.drugStore,
tpl: '<tpl for="."><div class="drug-item"><div class="drug-item-name">{sDescrizione}</div></div></tpl>',
itemSelector: 'div.drug-item',
singleSelect: true,
grouped: false,
indexBar: false,
emptyText: 'Non ci sono elementi per l\'elemento selezionato',
disclosure: {
scope: this,
handler: function(record, btn, index) {
Ext.getCmp('contentPanel').setCard(Ext.getCmp('principlesList'));
}
},
listeners: {
itemtap: function(list, index) {
//todo: add code to handle itemtap...
}
},

dockedItems: [{
title: 'Farmaci',
xtype: 'toolbar',
dock: 'top',
items: [{
id: 'backToGroups',
ui: 'back',
text: 'Gruppi',
handler: function(){
Ext.getCmp('contentPanel').setCard(Ext.getCmp('groupsList'), {type: 'slide', direction: 'right'});
}
}]
}]
});



i found the solution.
i inserted the second list in another panel, too...
does anybody know why in 0.93 it was allowed and now it isn't?
thanks

evant
4 Oct 2010, 3:55 PM
It was never the intention for it to work that way, a component can only ever exist in one spot, so it was more just good luck it worked in the first place.