Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7932889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:09:18+00:00 2026-06-03T21:09:18+00:00

I am creating a mobile app with Flex 4.6 and I’m using the SplitViewNavigator

  • 0

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,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T21:09:20+00:00Added an answer on June 3, 2026 at 9:09 pm

    You can try to do something like this:

    Main.mxml:

    <?xml version="1.0" encoding="utf-8"?>
    <s:TabbedViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                                      xmlns:s="library://ns.adobe.com/flex/spark"
                                      applicationDPI="160"
                                      creationComplete="this_creationCompleteHandler(event)"
                                      >
        <fx:Script>
            <![CDATA[
                import events.ViewEvent;
    
                import mx.events.FlexEvent;
    
                import views.RightView1;
    
                protected function this_creationCompleteHandler(event:FlexEvent):void
                {
                    leftNav.addEventListener(ViewEvent.CHANGE_VIEW, leftNav_changeViewHandler);
                }
    
                protected function leftNav_changeViewHandler(event:ViewEvent):void
                {
                    rightNav.pushView(event.view);
                }
    
            ]]>
        </fx:Script>
    
        <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>
    </s:TabbedViewNavigatorApplication>
    

    LeftView.mxml:

    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
            xmlns:s="library://ns.adobe.com/flex/spark"
            title="LeftView">
    
        <fx:Script>
            <![CDATA[
                import events.ViewEvent;
    
                import mx.collections.ArrayCollection;
    
                import spark.events.IndexChangeEvent;
    
                private function labelFunc(item:Object):String
                {
                    return getQualifiedClassName(item).split("::")[1];
                }
    
                protected function list_changeHandler(event:IndexChangeEvent):void
                {
                    dispatchEvent(new ViewEvent(ViewEvent.CHANGE_VIEW, list.selectedItem as Class, true));
                }
    
            ]]>
        </fx:Script>
        <s:List id="list" height="100%" width="100%"
                dataProvider="{new ArrayCollection([RightView1, RightView2, RightView3])}"
                labelFunction="labelFunc"
                change="list_changeHandler(event)">
    
        </s:List>
    </s:View>
    

    ViewEvent.as:

    package events
    {
        import flash.events.Event;
    
        public class ViewEvent extends Event
        {
    
            public static const CHANGE_VIEW:String = "changeView";
    
            public function ViewEvent(type:String, view:Class, bubbles:Boolean=false, cancelable:Boolean=false)
            {
                super(type, bubbles, cancelable);
    
                this.view = view;
            }
    
            public var view:Class;
    
            override public function clone():Event
            {
                return new ViewEvent(type, view, bubbles, cancelable);
            }
        }
    }
    

    This worked for me, but I don’t like this_creationCompleteHandler part in Main.mxml and it’s up to you how to catch ViewEvent. Hope this can help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

we are creating one jQuery mobile app in that app, I have to bind
While creating a mobile web app with the Facebook javascript SDK, I have one
I am creating an app using phonegap+jquery mobile.I have three radio buttons and a
I am creating a mobile app using jquery mobile, PHP using JSON for fetching
I'm creating a Mobile App with JQM and JSP I'm using Bookmark bubble to
I'm creating a Windows Mobile 6 application using MFC Single Document Interface with CFormView
We are creating sample application for windows mobile using Rijndael algorithm. Its working fine.
I have a question. When i am creating an application in rhomobile jquery.mobile.structure-1.0.css present
I am writing a mobile App involving creating a Blogger client. I have the
I am creating a mobile app that will connect to a zendamf implementation to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.