display different component on same mxml page
i want to implement this. (http://www.adobe.com/devnet-archive/flex/tourdeflex/web/#docIndex=开发者_如何学Go1;illustIndex=0;sampleId=0) type of structure in my application.how can i display different component in different parts.
The layout uses divided boxes. The left side is filled with a tree and the right side changes dynamically based on the selection on the left.
Tour De Flex doesn't display any content, it just links to it. So, I'm sure they are loading up information from a database to populate the tree which also includes enough information to create the display on the right. I would assume they use ActionScript.
The simplest way would be to use states on the right side panel, with one state per component. When you select an option on the left, change the state on the right.
That may not scale well. In that case, you'll have to create, add, and remove components via actionscript.
Check the sample code for similar layout here!
精彩评论