PDA

View Full Version : radio buttons are displaying multiple time in a panel



nawin.muttineni@gmail.com
14 Dec 2012, 1:35 AM
Hi,
I have a panel with some text fields, date fields,combos,radio buttons.
Every thing is working properly, but radio buttons are displaying somtimes twice, sometimes thrice.
can any one please help me to resolve this issue.
Bellow is my code..



Ext.define('tz.ui.InvoiceSearchPanel', {
extend: 'Ext.form.Panel',

bodyPadding: 10,
title: 'Search Invoices',
frame:true,
anchor:'80%',
autoScroll:true,
fieldDefaults: { msgTarget: 'side',labelAlign: 'right'},


initComponent: function() {
var me = this;

me.employeeCombo = new tz.ui.EmployeeCombo({
store: ds.allEmployeeStore,
labelAlign: 'right',
listeners:{
scope:me,
select:function(combo, records) {
app.timesheetService.getEmpProjectCodeList(records[0].data.id, me.loadEmpBillingRateCombo, me);
}
},
tabIndex:1
});
me.employeeCombo.allowBlank = true;
me.employeeCombo.forceSelection = false;
me.employeeCombo.valueField = 'fullName';
me.employeeCombo.name = 'name';

me.empBillingRateCombo = new tz.ui.EmployeeRateCombo({
store : ds.empBillingRateOptionStore,
labelAlign: 'right',
fieldLabel:'Project-Code',
editable: false,
tabIndex:2,
width:300
});

var sortingStore = Ext.create('Ext.data.Store', {
fields: ['label', 'value'],
data : [
{"label":"Invoice NO", "value":"invoiceNo"},
{"label":"Status", "value":"status"},
{"label":"Billing From", "value":"billingFrom"},
{"label":"Billing To", "value":"billingTo"},
{"label":"Invoice Date", "value":"invoiceDate"},
{"label":"Invoice Amount", "value":"invoiceAmount"},
{"label":"Receipt Amount", "value":"totalReceiptAmount"}
]
});


me.sortingCombo = Ext.create('Ext.form.ComboBox', {
fieldLabel: 'Sort By',
store: sortingStore,
id : 'invoiceSorting',
name : 'sortingCombo',
queryMode: 'local',
displayField: 'label',
value:'billingTo',
labelAlign: 'right',
valueField: 'value'

});

me.radioGroupInvoice =
{
xtype: 'radiogroup',
width: 100,
padding:'0 0 0 130%',
fieldLabel: '',
name: 'invoiceOrder',
id: 'invoiceOrder',
//cls: 'x-check-group-alt',
// Arrange radio buttons into two columns, distributed vertically
columns: 2,
vertical: true,
items: [
{
xtype: 'radiofield',
boxLabel: 'ASC',
name: 'rb',
id:'ASC' ,
inputValue: '1'
},{
xtype: 'radiofield',
boxLabel: 'DESC',
name: 'rb',
id:'DESC',
inputValue: '2',
checked: true,
}
]
};


me.items = [
{
xtype:'container',
layout: 'column',
items :[{
xtype: 'container',
columnWidth:.5,
items: [me.employeeCombo,{
xtype:'textfield',
fieldLabel: 'Vendor Name',
name: 'vendorName'
},me.sortingCombo,me.radioGroupInvoice]
},{
xtype: 'container',
columnWidth:.5,
items: [
// me.empBillingRateCombo,
{
xtype:'textfield',
fieldLabel: 'Invoice No',
name: 'invoiceNo'
},{
xtype:'textfield',
fieldLabel: 'Status',
name: 'status'
},{
xtype:'datefield',
fieldLabel: 'Billing From',
name: 'billingFrom'
},{
xtype:'datefield',
fieldLabel: 'Billing To',
name: 'billingTo'
}]
}]
}
];
me.buttons = [
{
text : 'Search',
scope: this,
handler: this.search
},
{
text : 'Reset',
scope: this,
handler: this.reset
}
]

me.listeners = {
afterRender: function(thisForm, options){
this.keyNav = Ext.create('Ext.util.KeyNav', this.el, {
enter: this.search,
scope: this
});
}
}

me.callParent(arguments);
},


search : function() {

},


reset:function(){
this.form.reset();
}
});

mitchellsimoens
16 Dec 2012, 9:24 AM
There is nothing here that should do that. I cannot reproduce it with sample code