Feb 23, 2009, 8:59 AM
BeforeTabChange event
How to implement following behaviour ?
I'd like to perform validation of controls on tab when user is going to switch tab. Lack of validation should keep user on current tab and display messagebox. I've tried beforetabchange, but it seems to fire event when window loads:
I'd like to perform validation of controls on tab when user is going to switch tab. Lack of validation should keep user on current tab and display messagebox. I've tried beforetabchange, but it seems to fire event when window loads:
function changedTab() {
var actTab = tabMain.getActiveTab();
switch (actTab) {
case (actTab = tabPersonData):
if (!tabPersonDataValidate()) {
Ext.Msg.alert('Walidacja', 'XXX');
return false;
}
break;
}
return true;
in html part:
<Listeners>
<BeforeTabChange Handler="return changedTab();" />
</Listeners>