开发者

Flex Spark tabbar : initialize hidden tabs

problem is I have a spark Tabbar, 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?


The best way to handle this is to have a data model that each tab is displaying and editing, rather than trying to go in and read the values out of the controls in each tab, and save those. This is at the heart of MVC.

However, if you're too invested in your current architecture to be able to change it and you are using a ViewStack with your TabBar, you may find that setting creationPolicy to "all" does what you want. If you're using States, I don't think you can force all of them to be instantiated without putting your application into each State at least once.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜