PDA

View Full Version : FieldSet event listeners not working!



vela1606
24 May 2011, 8:38 AM
Can not get a fieldset event "active" listener to work...

Basically and I have 2 fieldsets and wanna disable one if the otherone is selected.
I've try activate (http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.FieldSet-event-activate), beforedeactivate (http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.FieldSet-event-beforeactivate) and nothing

afterrender (http://docs.sencha.com/ext-js/4-0/#/api/Ext.form.FieldSet-event-afterrender) does work tho :-)



xtype:'fieldset',
id:'rootFieldset',
checkboxToggle:true,
title: 'Create a New Database (Roor Access Needed)',
defaultType: 'textfield',
collapsed: true,
layout: 'anchor',
defaults: {
anchor: '100%'
},
items :[{
fieldLabel: 'Database Host',
name: 'dbHost',
allowBlank:false
},{
fieldLabel: 'Database Port',
name: 'dbPort'
},{
fieldLabel: 'Root User',
name: 'rootUser'
}, {
fieldLabel: 'Root Password',
name: 'rootPass'
}],
listeners: {
activate: function(){
Ext.Msg.alert('Status', 'TEST!!!.');

//Ext.getCmp('dbuserFieldset').disable();
//Ext.getCmp('rootFieldset').enable();
}
}