PDA

View Full Version : Combo select event in controllers



asulhyan
6 Jun 2013, 8:05 AM
In controller, for xtype - 'userslist' the example captures itemclick event. Can this work "id" / "alias" instead ?



init: function() {
this.control({
'userslist': {
itemclick: this.onListItemClick
},
'usersedit': {
afterrender: this.onEditAfterRender
}
});
}

team.avesta
8 Jun 2013, 12:48 AM
Define a combo config named "itemId : 'abc' " within your view.
.



init: function () {
this.control({
'combo#abc': {
select : function()
{
alert('Best of luck');
}
});



.
.
Tell me if it works for you

existdissolve
8 Jun 2013, 8:58 AM
In controller, for xtype - 'userslist' the example captures itemclick event. Can this work "id" / "alias" instead ?



init: function() {
this.control({
'userslist': {
itemclick: this.onListItemClick
},
'usersedit': {
afterrender: this.onEditAfterRender
}
});
}



And if your xtype is complex (e.g., my.special.xtype), you can also do a selector like so:


combo[xtype=my.special.xtype]