I am creating a mobile app with Flex 4.6 and I’m using the SplitViewNavigator with tabbed application. I have one left view that never changes that has a static list associated with it. I have multiple views for the right panel of the SplitViewNavigator. I can load the left view and the 1st right view but do not know how to change the view of the right view after a selection has been made from the list in the left view.
My main app file has the following code to load the split view and display the left and 1st right view.
<s:SplitViewNavigator id="svn" width="100%" height="100%">
<s:ViewNavigator id="leftNav" width="30%" height="100%" firstView="views.LeftView"/>
<s:ViewNavigator id="rightNav" width="70%" height="100%" firstView="views.RightView1"/>
</s:SplitViewNavigator>
My left view just has a simple list and I can determine which item has been selected but I don’t know how to make the right view change. Assume the right views are just called RightView1, RightView2, etc.
I am assuming I need to use a pushView method but do not know how to reference the right view id (rightNav) in the main app file from the leftView view. But I could be way off here so any help would be greatly appreciated.
cheers,
You can try to do something like this:
Main.mxml:
LeftView.mxml:
ViewEvent.as:
This worked for me, but I don’t like
this_creationCompleteHandlerpart inMain.mxmland it’s up to you how to catchViewEvent. Hope this can help.