Flex tab navigator: initialize hidden tabs
Asked Answered
S

2

8

My problem: I have a tab navigator, with many forms in each tab. But I have a single global save button. Problem is, if I don't open a Tab, it doesn't get initialized and therefore the forms it contains do not exist..

How Can I make it as if the user had clicked on every tab?

Strychninism answered 2/12, 2009 at 11:13 Comment(0)
M
14

set its creationPolicy to "all"

<mx:TabNavigator creationPolicy="all">
    <!--Children-->
</mx:TabNavigator>
Midwifery answered 2/12, 2009 at 11:19 Comment(0)
B
0

I am using SuperTabNavigator which is an extension of the TabNavigator navigation container

I used the below script to initialize all tabs

private function initMainTab():void 
    { 
        for (var i:int = 0; i < superTabNav.getChildren().length ; i++)  
        { 
            superTabNav.selectedIndex = i; 
            superTabNav.validateNow();      
        } 
        superTabNav.selectedIndex = 0; 
    }
Bott answered 13/2, 2012 at 9:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.