Blocking TabBar Click/Change Events
12.15.2008One scenario that often presents itself when developing a Flex application is blocking users from navigating away from the current view. You might want to do this if the user’s form data is incomplete or if data has changed and you want to ensure they want to discard or save their changes.
When the TabBar comes into play, blocking tab changes isn’t always straightforward. The TabBar doesn’t dispatch any type of TabChanging event that can be canceled. Nothing else is really offered in the way of blocking the action either. To make matters worse, a click on a tab in the tabbar actually dispatches two different click events, one of which is a “simulated click trigger event.”
My purpose isn’t to go into the shortcomings of the TabBar component or its inner workings. Instead, I’ll offer the BlockableTabBar for your use:
Continue reading »

