PDA

View Full Version : Row Editor having stack Over flow when selecting values from a Combo box



shanika
3 Jan 2011, 10:29 PM
Hi ,
I am having problem with a row editor where there are several drop downs.
here's how that happen
.
When I load the 2nd drop down which is depending on the first drop down and then select the value.the IE get stuck and after few seconds I get a alert message saying stack over flow at line 26.

And when I click the first combo again to select a different value the same issue happens.:(

This issue only happen in IE .I checked in firefox and it works fine .

here is the code.

// combo box Code


var productCode_RW_Store = new Ext.data.Store({
baseParams:{ajax_command:'loadProductCode'},
proxy: new Ext.data.HttpProxy({
url:'/productCode_RW_Store/loadProductCode.ajax',
method: 'GET'
}),
reader: new Ext.data.JsonReader({
root: 'productCodes',
id: 'did'
}, [
{name: 'did', mapping: 'objectDid'},
{name: 'title', mapping: 'productCode'}

])
});

var productCodeComboBox = new Ext.form.ComboBox({
xtype: 'combo',
id: 'productCode_row',
store: productCode_RW_Store,
displayField: 'title',
valueField: 'did',
editable: false,
mode: 'local',
triggerAction: 'all',
emptyText:'Choose ProductCode ...',
allowBlank:false,
lazyRender:true,
listeners: {
scope:this,
select: function(combo, record, index) {
if(productCodeComboBox.value == -1 ){
orderStore.data.items[orderStoreIndex].data.status = 0;
}
orderStore.data.items[orderStoreIndex].data.strobjectDID = productCodeComboBox.value;
orderStore.data.items[orderStoreIndex].data.ProductCode = productCodeComboBox.lastSelectionText;
grid.view.refresh();
}
}

});

//code in the grid
{
id: 'ProductCode',
header: '<%=i18NHelper.getString("ebaftersales.batch.ui.ProductCode","ebaftersales")%>',
dataIndex: 'ProductCode',
width: 100,
editor: productCodeComboBox,
renderer:function(value,meta, record,data) {
var ProductCode = record.data.ProductCode;
var record1 = productCodeComboBox.findRecord(productCodeComboBox.valueField, value);
if(value == -1 || value== ''){
meta.css = 'print_underline';
}
return record1 ? record1.get(productCodeComboBox.displayField):ProductCode;

}

},



Hope you guys can help me to fix this issue