PDA

View Full Version : Click Listener on a disabled Tab



mirton
29 Sep 2009, 9:50 AM
Hi,

I'm trying to get an event triggered when the user clicks on a tab that is disabled.
I want to inform the user with a mesagebox that: "In order to go into tabname, you need to some_action"

I looked at the TabPanel Events, but nothing there seems to work.

Anyone know of an event listener that could do this?

Thanks.

jdent
19 Oct 2009, 2:56 PM
You can just put a listener on the tab panel for "beforetabchange"...this will give you the current panel and the new panel.



this.addListener('beforetabchange',function(mainApplicantPanel, newTab, currentTab){
if (newTab === addApplicantPanel){
this.crAddApplicant();
return false;
}
});