PDA

View Full Version : Superboxselect - something weird going on



polydyne
9 Jul 2010, 6:10 AM
Hello,
We have recently upgraded from Ext 3.0 to 3.2.1 and everything seems to be working fine ofcourse not without a few changes. However with superboxselect user extension we are seeing some weird behavior.

We have 2 superboxselectboxes on a filter window. e.g. filter by part number and filter by commodity.. now when u open the filter window for the first time both the boxes work and you can see the selections and change the selections etc. but then you filter the records and open the filter window again, the first selected superbox does not expand any more. the other superbox works fine.

I am attaching the code here, please take a look and help me out here.. thanks much.

Here is how I am opening the filter window..


handler: function(){
if (!filterWin) {
filterWin = new Ext.Window({
title: 'Awards Filter',
width: 500,
autoHeight: true,
closeAction:'hide',
border: true,
bodyBorder: false,
autoScroll: true,
modal: true,
bodyStyle:'padding:5px 5px 5px 5px',
items: [awardsFilterFormPanel],
layout: 'form'
});
}
filterWin.show();
filterWin.center();
}


Here is my awardsFilterFormPanel..


var awardsFilterFormPanel = new Ext.FormPanel({
id:'awardsFilterForm',
frame:true,
autoHeight: true,
items: [
{
allowBlank: true,
id:'display_parts_combo',
xtype:'combo',
fieldLabel: 'View By',
resizable: true,
name: 'display_parts_combo',
width: 350,
store: displayPartsStore,
mode: 'local',
triggerAction: 'all',
displayField: 'value',
hiddenName:'id',
valueField: 'id',
forceSelection : true,
allowBlank: false,
value:'<%=displayPartsId%>'
},
{
allowBlank: true,
id:'filter_part_number_combo',
xtype:'superboxselect',
fieldLabel: 'Part Numbers',
emptyText: 'Select Part Number',
resizable: true,
name: 'filter_part_number_combo',
width: 350,
store: partsStore,
mode: 'local',
displayField: 'part_name',
displayFieldTpl: '{part_name}',
valueField: 'part_id',
forceSelection: true,
value: '<%=partSelections%>'
},
{
allowBlank: true,
id:'filter_commodity_combo',
xtype:'superboxselect',
fieldLabel: 'Commodities',
emptyText: 'Select Commodity',
resizable: true,
name: 'filter_commodity_combo',
width: 350,
store: filterCommodityComboStore,
mode: 'local',
displayField: 'commodity_code',
displayFieldTpl: '{commodity_code}',
valueField: 'commodity_id',
forceSelection : true,
value: '<%=commSelections%>'
},
{
xtype: 'checkbox',
id: 'chk_sub_commodities',
fieldLabel: 'Include Sub Commodities',
boxLabel: '',
name: 'chk_sub_commodities',
checked: <%=includeSubCommodities.booleanValue()%>
}],
buttons: [
{xtype: 'tbfill'},
{
text: 'Filter',
formBind: true,
handler: function(){
if(true){
awardsFilterFormPanel.getForm().submit({
url: '<%=awardsFilterFormUrl%>',
method: 'POST',
waitMsg: '<%=waitMsgStr%>',
success: function(form, action){
awardsPricingStore.reload();
filterWin.hide();
},
failure: function(form, action){
//TO DO:
//add failure code
}
});
}
}
},
{
text: 'Reset Filter',
formBind: true,
handler: function(){
{
var conn = new Ext.data.Connection();
conn.request({
waitMsg: '<%=waitMsgStr%>',
url: '<%=resetAwardsFilterURL%>',
method: 'POST',
callback: function(opt,success,responseObj){
if (success) {
var responseData = Ext.util.JSON.decode(responseObj.responseText);
if ( responseData.success == true ) {
awardsFilterFormPanel.getForm().reset();
Ext.getCmp('filter_commodity_combo').clearValue();
Ext.getCmp('chk_sub_commodities').setValue('false');
awardsPricingStore.reload();
filterWin.hide();
}
} else {
Ext.Msg.alert('Error', 'Filter could not be reset, Please try again!');
}
}
});
}
}
},
{
text: 'Cancel',
handler: function(){
filterWin.hide();
}
}]
});

Condor
9 Jul 2010, 11:47 PM
You probably have a better chance of a response when asking this question in the SuperBoxSelect thread.