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

  • Home
  • SEARCH
  • 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 8401527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:49:49+00:00 2026-06-09T21:49:49+00:00

I have this ViewNavigator inside a callout and the callout displays a view inside

  • 0

I have this ViewNavigator inside a callout and the callout displays a view inside it using firstView=”views.ListMenusHomeView” . Now how can I close the callout from ListMenusHomeView? Hope someone can help.

Here is my code for the callout:

<?xml version="1.0" encoding="utf-8"?>
<s:Callout xmlns:fx="http://ns.adobe.com/mxml/2009" 
           xmlns:s="library://ns.adobe.com/flex/spark"
           contentBackgroundAppearance="none"
           height="300" width="300"> 
    <fx:Declarations>
        <fx:XML id="menu" source="xmldata/menu2.xml" /> 
    </fx:Declarations>

    <fx:Script>
        <![CDATA[

            import spark.events.PopUpEvent;
            protected function back(event:MouseEvent):void {

                if(viewNav.length>1)
                    viewNav.popView();
            }


        ]]>
    </fx:Script>

    <s:ViewNavigator id="viewNav" width="100%" height="100%" firstView="views.ListMenusHomeView">
        <s:navigationContent>
            <s:Button label="Back" click="back(event)"/>
        </s:navigationContent>
        <s:actionContent>
            <s:Button label="Cancel" click="close(false)"  emphasized="true"/>
        </s:actionContent>
    </s:ViewNavigator>

</s:Callout>

You see that there is a ViewNavigator which holds the ListMenusHomeView. This is the code for the ListMenusHomeView.

<?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="Main Menu" creationComplete="onCreationComplete()">

<fx:Declarations>
    <fx:XML id="menu" source="xmldata/menu2.xml" /> 
</fx:Declarations>

<fx:Script>
    <![CDATA[

        import com.adobe.serializers.xml.XMLDecoder;

        import mx.collections.ArrayCollection;

        import spark.events.IndexChangeEvent;

        [Bindable]
        private var dataArray:ArrayCollection = new ArrayCollection();  

        private var object:DataArray = new DataArray();

        private function onCreationComplete() : void{

            var decoder:XMLDecoder = new XMLDecoder();
            var resultObj:Object = decoder.decode(menu);    

            dataArray = object.onCreationComplete(menu, menu.menuitem, resultObj, resultObj.menuitem); 

        }

        protected function list1_changeHandler(event:IndexChangeEvent):void
        {

        }



    ]]>
</fx:Script>

<s:List id="tileLayout"
        width="100%" height="100%"
        verticalScrollPolicy="off" horizontalScrollPolicy="on"
        pageScrollingEnabled="true" dataProvider="{dataArray}"
        itemRenderer="renderers.iconList2" change="list1_changeHandler(event)">
    <s:layout>
        <s:TileLayout orientation="columns" requestedRowCount="3" 

                      verticalGap="20" horizontalGap="20"/>

    </s:layout>

</s:List>

Now I want to close MyCallout whenever I click an icon inside ListMenusHomeView. The function list1_changeHandler(event:IndexChangeEvent) is responsible for that one.

What should I do?

  • 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-09T21:49:51+00:00Added an answer on June 9, 2026 at 9:49 pm

    The Callout class has a close() method, so you basically just need to access the ListMenusHomeViews parentDocument (which would be your “viewNav” ViewNavigator) and its parentDocument, which should be your ListMenusHomeView.

    I haven’t tested it but you might fiddle around with the parentDocument, parent and owner properties to access the correct object. Try them with a simple trace and you’ll be up and running in no time.

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

Sidebar

Related Questions

Have this dictionay retrieving values from DataTable: Dictionary<string,string> meta= ds.Tables[1].Select(key<>'format').AsEnumerable().ToDictionary(k=>k.Field<string>(0),v=>v.Field<string>(1)); How would I apply
Have this in Global.asax using windsor 2.5.1.0 _windsor.Register( Component.For<IViewEngine>().ImplementedBy<RazorViewEngine>(), ); When executing this right
I have this query: SELECT DISTINCT phone, department FROM `users` WHERE ((SUBSTRING(phone,1,3) = '399')
I have this regular expression right now and it's just printing out 1: ^[0-9]{10,15}$^
Have this print output from print_r($theobject); SimpleXMLElement Object ( [@attributes] => Array ( [label]
I have this treepanel and i want to call this.getId() method of mainpaneltree from
I have this simple sample on VS2010: using System; namespace ConsoleApplication1 { class Program
I have this setup where in my development copy I can commit changes on
I have this string 'john smith~123 Street~Apt 4~New York~NY~12345' Using JavaScript, what is the
I have this content in XML: <place> <placeName>!@#$%&*?/_'()-+;</placeName> </place> it's correct when I view

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.