Content of NavigatorContent

Hi all!

Now, it's strange to me, but I can't access a real content of the ViewStack component. Here is the code:

< mx:ViewStack id = "myViewStack" >
< s:NavigatorContent id = "businessNavigator" >

< business: BusinessOperator id = "businessOperator" / >

< / s:NavigatorContent >

< / mx:ViewStack >

How can I access the element called businessOperator?

I tried to add event listener to a viewStack:

< mx:ViewStack id = "myViewStack" change = "myViewStack_changeHandler (event)" >... "

And then:

protected function myViewStack_changeHandler(event:IndexChangedEvent):void
{

var currentOperator = event.relatedObject;

}

But this brings me only to the businessNavigator, he's not happy.

Tried to access businessNavigator.getChildAt (0), but it's only the instance of skin...

Try getElementAt (0) instead of getChildAt (0)

Tags: Flex

Similar Questions

  • Dynamically load content in NavigatorContent inside Viewstack

    Thanks for help.

    Question:

    How do I dynamically load components or inside a NavigatorContent buttons when the user clicks on the

    Label NavigatorContent appropriate within the viewstack located inside the TabBar component?

    Code example...

    < s:Scroller id = "scrollerHome" includeIn = "Home" x = "3" y = "8" width = "933" height = "584" >

    < s:VGroup width = '100 percent"height ="100% ">

    < s:TabBar dataProvider = "{viewstackHome}" / >

    < mx:ViewStack id = "viewstackHome" width = '936' height = '553' >

    < s:NavigatorContent width = '100 percent"height ="100% "label ="Tab 1">

    .

    .

    .

    < / s:NAvigatorContent >

    < s:NavigatorContent width = '100 percent"height ="100% "label ="Tab 2">

    < / s:NavigatorContent >

    .

    .

    .

    < / mx:ViewStack >

    < / s:TabBar >

    < / s:VGroup >

    < / s:Scroller >

    When the user click on Tab1 or Tab2 depending on the time of day I want to

    display a different set of components which vary in number.

    Is there something that I need to manage, if so how. I could not find in these objects.

    Other suggestions are also welcome.

    Thank you

    Jumroo

    Since it's content browser, all components are created automatically the responsibility of the application that they do not obey the creationpolicy.

    1st way: I could intercept the events of "hide" / "show" on the content of navigator to listen to the event and dynamically add child elements.

    2nd way: Instead of Viewstack I'll go with the States of the spark.

    and on creationComplete of these components you can manage it that display and what not to do.

  • Delete the contents of the ViewStack child

    In my application, I can add content inside a ViewStack but when I try to remove it, the app breaks.

    // TestProject.mxml (main application)

    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx">
        <s:layout>
            <s:VerticalLayout/>
        </s:layout>
        <fx:Script>
            <![CDATA[
                import com.NewContent;
               
                private function addContent():void
                {
                    var content:NewContent = new NewContent();
                    var navContent:NavigatorContent = new NavigatorContent();
                    navContent.id = 'newContent';
                    navContent.label = 'newContent';
                    navContent.width = Number('100%');
                    navContent.height = Number('100%');
                    navContent.addElement(content);
                   
                    viewStack.addElement(navContent);
                    viewStack.selectedChild = navContent;
                }
            ]]>
        </fx:Script>
        <mx:ViewStack id="viewStack" width="100%" height="100%">
            <s:NavigatorContent id="defaultContent"
                                label="defaultContent">
                <s:Button click="addContent()" label="Add Content"/>
            </s:NavigatorContent>
        </mx:ViewStack>
    </s:WindowedApplication>

     

    // NewContent.mxml (component)

    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:mx="library://ns.adobe.com/flex/mx"
             width="100%" height="100%">
        <fx:Script>
            <![CDATA[
                import mx.containers.ViewStack;
               
                public function removeContent():void
                {
                    ViewStack(this.parent).selectedIndex = 0;
                    this.parent.removeChild(this);
                }
            ]]>
        </fx:Script>
        <s:Button click="removeContent()" label="Remove Content"/>
    </s:Group>

    Any help would be greatly appreciated trying to get this working (if that's the best way to do it). Thanks in advance.

    Hello

    Check this code.

    private function addContent():void{     var content:NewContent = new NewContent();     content.addEventListener("removeMe",onRemove,false,0,true);     var navContent:NavigatorContent = new NavigatorContent();     navContent.id = 'newContent';     navContent.label = 'newContent';     navContent.width = Number('100%');     navContent.height = Number('100%');     navContent.addElement(content);
    
         viewStack.addElement(navContent);     viewStack.selectedChild = navContent;}
    
    private function onRemove(event:Event):void{     var content:NewContent = event.currentTarget as NewContent;     content.removeEventListener("removeMe",onRemove,false);     viewStack.removeChild(content.parent.parent.parent);}
    
    //Componenthttp://ns.adobe.com/mxml/2009"      xmlns:s="library://ns.adobe.com/flex/spark"      xmlns:mx="library://ns.adobe.com/flex/mx"     width="100%" height="100%">                         
    

    To access the NavigatorContent, content.parent.parent.parent is used. I don't know if there is a better way to access the parent of the child, added using the addElement() method.

  • Color NavigatorContent in TabNavigator

    Hello

    I have a TabNavigator with a few NavigatorContent definitions it contains.

    I am able to assign the label text and backgroundColor to green, but how can I put it in color?

    < s:NavigatorContent label = "Green" width = "100%" height = "100%" backgroundColor = "green" / >

    ↑ This is painted all green tab. I need to paint only the Green header. How can I do?

    I need each topic tab to have a different color. Any suggestions?

    There is no need to change the theme. Try this

    {.myTabs}
    backgroundColor: #FF0080;
    Skin:ClassReference('mx.skins.spark.ButtonSkin');
    chromeColor: #FF0080;  / * This is the tab widget, and not the content * /.
    }

  • Flex 4 NavigatorContent containing a form number

    I have an accordion control that contains some NavigatorContent containers it contains.  I seem to run into a problem when I have a breast form control in a container of NavigatorContent.  If I have many items in my form, the form will expand beyond the limits of the NavigatorContent and accordion to show all items on the list.

    The NavigatorContent does not seem to be a way to adjust the cut of its content as does the shape.  I put the form equal to the width and height of the container NavigatorContent, and this seems to create the desired features, but is not the right way to make this work.

         <mx:Accordion width="200" height="100" >
              <s:NavigatorContent  id="nc1" label="Accordion Pane 1" width="100%" height="100%">
    
                   <mx:Form>
                        <mx:FormItem label="TEST 1">
                             <s:Label text="IDK"/>
                        </mx:FormItem>
                        <mx:FormItem label="TEST 2">
                             <s:Label text="IDK"/>
                        </mx:FormItem>
                        <mx:FormItem label="TEST 3">
                             <s:Label text="IDK"/>
                        </mx:FormItem>
                        <mx:FormItem label="TEST 4">
                             <s:Label text="IDK"/>
                        </mx:FormItem>
                        <mx:FormItem label="TEST 5">
                             <s:Label text="IDK"/>
                        </mx:FormItem>
                        <mx:FormItem label="TEST 6">
                             <s:Label text="IDK"/>
                        </mx:FormItem>
                   </mx:Form>
    
              </s:NavigatorContent>
              
              <s:NavigatorContent label="Accordion Pane 1" width="100%" height="100%">
                   <s:Label text="Page 2"/>
              </s:NavigatorContent>
              
         </mx:Accordion>
    

    If I use Flex 3 method of the accordion and just us form instead of NavigatorContent container then it seems to work fine.

         <mx:Accordion width="200" height="200"  x="0" y="43">
    
              <mx:Form width="100%" height="100%">
                   <mx:FormItem label="TEST 1">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 2">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 3">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 4">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 5">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 6">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 7">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 8">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 9">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 10">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 11">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 12">
                        <s:Label text="IDK"/>
                   </mx:FormItem>                    
              </mx:Form>
                        
              <mx:Form width="100%" height="100%"> 
                   <mx:FormItem label="TEST 4444444">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 2">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 3">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 4">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 5">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 6">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 7">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 8">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 9">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 10">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 11">
                        <s:Label text="IDK"/>
                   </mx:FormItem>
                   <mx:FormItem label="TEST 12">
                        <s:Label text="IDK"/>
                   </mx:FormItem>                    
              </mx:Form>     
              
         </mx:Accordion>
    

    Does anyone know why I get this behavior?

    Wrap your form in a s:Scroller:

    
    
    
        
            
                
                    
                        
                            
                                
                            
                            
                                
                            
                            
                                
                            
                            
                                
                            
                            
                                
                            
                            
                                
                            
                        
                    
                
            
    
            
                
            
        
    
    
    

    Peter

  • Table of contents for several sheet file...?

    It is possible to:

    1. Create a Table of contents listing all sheets in a file?
    2. Have these hyperlink worksheet titles to the sheets themselves?

    I build what will eventually be a fairly large file (read: 75 + leaves). Rather than scrolling all the leaves one by one by one manually to locate the correct table, it would be useful to have a table of contents or an Index that lists the in order... Ideally, allowing the connection of hypertext link to the leaves they reference. (I swear that this was part of a way-back-when number...)

    Instead, is it possible to auto-trier worksheets in alphabetical order? He would not give me the project view as a table of contents or an Index of 35,000 feet, but at least it would be a little easier to find what it takes.

    Looking forward to sharing the wisdom...

    HI stephanie,.

    The numbers 2 (' 09) and 3 support not the hyperlinks to locations within the current document. Both take in charge of hyperlinks that open a Web page in your default browser or which will open and send a new e-mail message.

    Command-F can be your friend here.

    Place an array of single cell on each sheet (or use a cell on the existing table). Enter a short text string that identifies the table or sheet. Each string must be unique in the document.

    To access the card containing one of the following strings:

    Press Control + F to open the Find dialog.

    Enough chain to identify the worksheet type.

    Number will draw this roadmap forward as soon as it can determine which table contains the cell containing this string.

    Tested with four sheets containing:

    able, baker, charlie and delta

    With this limit together (and any other tables in the document - quite an artificial situation!), type c or d was enough to bring me to sheet 3 or 4, sheets 1 and 2 required two letters (ab or ba) to identify the good sheet and bring it forward.

    With a document containing several tables (and more leaves), create (and remembering) a separate channel for each becomes more complicated.

    You can place a second copy of each in a table of Index or table of contents on a separate sheet. From the index table,

    Copy the entry for the table/worksheet you want to go.

    Open the dialog to find (command-V)

    Paste the entry in the search box. (What it will find and highlight the entry that you have copied to the index table)

    Click on the > button on the dialog to find the occurrence FOLLOWING this string (on your target table.

    Kind regards

    Barry

  • Why Safary does not load the content of pages?

    Why Safary does not load the content of pages? I mean, when I hover over the places where should be the content, he is always showing the "redirect to: [email protected]/" lower left. My Safari is 9.5 and worked fine until Safe Fimder Virus get inside my computer. Mozilla Firefox is a bit slower. If someone could give me an idea on how to deal with it, I would be happy.

    Sorry if my English is not good, I am a Brazilian who is still learning English

    Your English is very good!

    Redirects are usually due to adware or malware.

    Download the run MalwareBytes.

    It of free and takes only a minute or two. Which should remove all adware and malicious software on your Mac.

  • After my 10 updated iOS even if I am connected to view the content I have cloud and iCloud when I try it asks me to put in place when already established sound upward. Help, please

    After the last update of iOS10. Even though I am connected to iCloud when I try to display the content he asks me to implement the iCloud. Can anyone help please.

    Try to perform a restart- restart your iPhone, iPad or iPod touch - Apple Support

  • 6s unlocked IPhone be locked after erase all content and settings

    6 s unlocked IPhone has been locked after erase all content and settings

    This statement should help you to disable find them my iPhone Activation Lock - Apple Support

  • The content of these files can be deleted?

    The content of these files can be deleted?

    In the Finder, and then to the library I have two files, one is called caches and cookies to others.  What is inside them can be deleted?

    I have an iMac running macOS Sierra 10.12.

    Thank you

    Select this option.

    There are actually several 'library' files in the Finder and it is better that you don't mess with them.  Most browsers have ways to delete the cookies in the browser itself and adjusting the size of browser cache.  Caches speed up the operation of the computer, and unless you have a specific problem, you have not and should not, remove them.  At best he probably will do nothing, and at worst you may have to reinstall your operating system.

  • mail lost content

    Just upgraded to Sierra.  I still have my messages in folders, but there is no content when I open the mail?

    You may need to wait as Spotlight to reindex your drive. If it has been a while since you updated, try reindexing Mail.

    With Mali leave...

    Go to the user's library > mail > V4 > MailData

    Find the 3 files with envelope in the name.

    Delete the files.

    Log Out under the Apple in the Menu bar

    Open a session

    Open mail

    Mail will be re-index your files.

    Search test when you have finished.

    Library of the user to see the

    The user library folder is hidden by default. In the unhide: select the Finder in the Dock. Less go in the Menu bar > hold down the Option key and you will see the library.

    Find the library user folder

    http://www.takecontrolbooks.com/resources/0167/site/chap11.html#FindingtheUserLi braryFolder

  • How can I delete an email from apple mail after removing the content (by virus scan software?)

    Recently, I received an avalanche of emails with malicious attachments.  I have not opened any of the accessories, and my antivirus software has picked up malicious content and removed from the email.  Thus, I find myself with an email on my system, no content.  Unfortunately, the system does not allow me to then remove the (s) e-mail that is left.  How can I remove these 'empty' emails in my Inbox mailbox?

    ... my antivirus software has picked up malicious content and removed from the email.

    Allowing something to edit the database of e-mail will result by it becomes corrupted.

    If you use Time Machine, restore the email by "entering Time Machine" of in Mail and choose a time to restore. Then, just delete suspicious e-mails in the usual way. Exit full screen before entering Time Machine.

    You may not use software "anti-virus" not Apple on a Mac, for this reason and many others. Identify the product you use to get the uninstall instructions.

  • CPU usage and Mail Web Content

    I had a problem with macOS Sierra and Safari 10 where the CPU load for any tab was about 140% and the spinning fans, this was resolved by disabling Trusteer report. However, I still have a running process 'Mail content Web' running at 199% and fans of loading up every so often. Is this normal (seems a bit high) or is there something else I should disable/enable?

    Thank you

    Hello danielfromfareham!

    Welcome to the communities of Apple Support!  Your question about your fans to vives after upgrading to Mac OS Sierra is greatly appreciated.  I know that if my Mac to run loudly after the upgrade, I'd be worried too.  It is my pleasure to help in any way I can today.

    When running in issues of fan, you want to first try a SMC reset.  I have an article that will guide you through the steps:

    Reset the management system (SCM) controller on your Mac.

    For more information on your Mac fans, check out this link:

    Learn more about your Mac fans

    Take care.

  • the smart playlist content

    I have a smart playlist that indicates that it contains 850 songs.  The content is another reading list that indicates that it contains songs of 2200.  Why are they not the same?  I designated the content as the other playlist and requested do not repeat that whatever it is played during the last 21 days.

    Any thoughts?

    Thank you.

    Tamar_m wrote:

    I have a smart playlist that indicates that it contains 850 songs.  The content is another reading list that indicates that it contains songs of 2200.  Why are they not the same?  I designated the content as the other playlist and requested do not repeat that whatever it is played during the last 21 days.

    Any thoughts?

    Thank you.

    Tamar,

    If the second selection rules, something like "Playlist" "is" "Playlist 1" and "Last played" "is not in the last" "21" "days", while the second should be shorter. "

    That explain it?  If this isn't the case, please post the rules you use.

  • I have a disc in my Mac and can not understand about where to go read the content?

    I have a disc in my desktop iMac computer and can't figure out how to break through the buttons right or my computer to read the content of the program?

    Double-click the icon of the disk on the desktop. I hope that you have installed an application that can read the content for you.

    If you don't see the icon of the disk on the desktop, open the Finder, then go to the Finder menu bar and click Finder > Preferences, and then select the general tab and then make sure: CD, DVD and iPods is selected.

Maybe you are looking for