been struggling with an issue now for a day or two. I have an Ext.Window that contains 2 combo-boxes. on the first load everything works fine, both stores are populated and the combo’s work as they should.
However, if I .show() the window a second time, the combo boxes do not “drop down” to display the lists. I have checked Firebug and there are no entries being added to the combo boxes although the stores are being populated.
Here is the code of the Window:
uTransferWindow = new Ext.Window({
id : 'windowUserLicenseTransfer',
title : 'Title',
width : 405,
autoScroll : true,
closeAction : 'hide',
closable : false,
modal : true,
bodyStyle : 'background-color:#FFF',
buttonAlign : 'center',
items : new Ext.form.FormPanel({
labelAlign : 'left',
labelWidth : 140,
bodyStyle : 'padding:10px 10px 0 10px',
border : false,
defaults: {
xtype: 'ComboBox',
anchor: '100%',
tpl: '<tpl for="."><div class="x-combo-list-item"><div style="position:absolute;left:4px;">{initials}</div><div style="position:relative;left:50px;">{username}</div></div></tpl>',
displayField: 'username',
valueField: 'userid',
typeAhead: true,
mode: 'local',
triggerAction: 'all'
},
items: [{
hiddenName: 'fromuserid',
fieldLabel: 'From User',
id : 'drop1',
store: userswithlicenses
}, {
hiddenName: 'touserid',
fieldLabel: 'To User',
id : 'drop2',
store: userswithoutlicenses
}]
}),
buttons : [{
text : 'Transfer License',
handler : function() {
//do stuff
}
}, {
text: 'Cancel',
handler: function() { uTransferWindow.hide(); }
}]
}),
I have not been able to find anyone else with a similar problem on the forums, any help would be appreciated.
UPDATE: found something small though: When the Window is shown the second time around the z-index has indeed increased. Why would the z-index increase each time the window is shown?
Make sure you aren’t calling new Ext.Window multiple times – since you are hiding the window instead of destroying if you call new on it with the same config the id’s of the combo boxes will conflict and have the behavior you are describing.