PDA

View Full Version : combobox problem.



fenglin1985
30 Mar 2012, 3:01 AM
the loadMask is aways display when the sotre load more than one time.

when i click the button, the combobox data was load sucess, but the loadMask still display, and never disopse.



<script type="text/javascript">

Ext.onReady(function () {

Ext.define('State', {
extend: 'Ext.data.Model',
fields: [
{ type: 'int', name: 'id' },
{ type: 'string', name: 'cname' }
]
});

var store = Ext.create('Ext.data.Store', {
model: 'State',
proxy: {
type: 'ajax',
url: '/GangedCombo/GetCity?act=sheng&'
},
autoLoad: true,
remoteSort: true
});

Ext.create("Ext.panel.Panel", {
renderTo: document.body,
width: 290,
height: 220,
title: "Test",
plain: true,
margin: '30 10 0 80',
bodyStyle: "padding: 45px 15px 15px 15px;",
defaults: {
autoScroll: true,
bodyPadding: 10
},
items: [{
xtype: "combo",
displayField: 'cname',
valueField: 'id',
store: store
}]
})
Ext.get("btnLoad").on("click", function () {
store.load();
});
});

</script>
<div>
<button id="btnLoad" >load</button>
</div>

mitchellsimoens
30 Mar 2012, 9:38 AM
What Ext JS 4 version are you using? Sounds like a bug that was fixed in 4.1.0

fenglin1985
30 Mar 2012, 6:05 PM
i'm using version 4.0.7 before, i'm try using version 4.1.0, the problem was fixed! thank you so much!