PDA

View Full Version : need some information about controller



extremed
13 Mar 2012, 10:25 AM
Hi

inside controller how to register multiple events to one selector ?

lets say i have code like this


init: function()
{
this.control({
'myapp_login': {
beforeclose: this.onLoginclose
},
'myapp_login': {
afterrender: this.onAfterrender
}
});
}

only beforeclose function is called and afterrender function not called any idea why its calling only first function?

how to register multiple event calls like this?

Regards

dedoz
13 Mar 2012, 10:38 AM
are you using 4.1beta3 theres alot of posts bout afterrender not triggering with beta3

extremed
13 Mar 2012, 10:41 AM
nope, im using 4.0.7

extremed
13 Mar 2012, 10:53 AM
this seems to be working


init: function()
{
this.control({
'myapp_login': {
beforeclose: this.onLoginclose,
afterrender: this.onAfterrender
}
});
}