开发者

Flex tab navigator: initialize hidden tabs

开发者 https://www.devze.com 2022-12-12 21:39 出处:网络
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 cont

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 h开发者_开发知识库ad clicked on every tab?


set its creationPolicy to "all"

<mx:TabNavigator creationPolicy="all">
    <!--Children-->
</mx:TabNavigator>


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; 
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消