I am working in extjs4.I am going to stuck at a point where I have to handle checked and unchecked event on checkbox.I did not found proper event for this selection. I just want to handle checked and unchecked event on check box..
here Is my some code
1) view code:----
Ext.define('Am.user.Login', {
extend:'Ext.form.Panel',
id:'loginId',
alias:'widget.Login',
title:'Get your key to socialize yet earn and learn (always free)',
items:[
{
----
},
{
xtype:'checkbox',
fieldLabel: 'Remember me',
name: 'remember',
//id:'checkbox1',
action:'check'
},
],
});
2) controller code :---
Ext.define('Am.sn.UserController',
{
extend:'Ext.app.Controller',
------------
-----
init:function()
{
console.log('Initialized Users! This happens before the Application launch function is called');
this.control(
{
'Login button[action=loginAction]':
{
click:this.authenticateUser
},
'Login checkbox[action=check]':
{
change:this.checkedRemeberMe
},
}); //end of control
},//end of init function
checkedRemeberMe:function()
{
console.log("check box selected");
},
});
here i am going to use change event but it calls every time when it is selected or deselected.. Which event I is required here? please give me some suggestions...