开发者

Flex tab navigator: initialize hidden tabs

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜