ViewStack reload children on the change tab

So I have a viewstack full of different forms and others. I wish that some of the forms to be destroyed and recreated when I tab far and return to them. These forms should be used more than once, and it would take a lot of work to write something that cleans up manually it. Part of the forms are generated dynamicaly keeps me strapping a model directly to it and just clean. There is a great need, I in my application and I want a cleaner/easier way to do. Ideally I want to be able to recharge a child in the stack view when the tab is changed. For some tabs, I'm not, but I could live with it if they have been refilled.

Now my solution in Flex 3 is to use a charger module or a viewstack with Chargers of module in the form of views. With the viewstack I would just reload the charger module for the tab selected if I wanted to be reloaded. Unforuntely, is more convenient because of a few additions in Flex 4. It apparently was an abuse of the modules since I was referencing modules outside of them without an interface (which I will not write). I've referenced them in their mediators, which, since they are not referenced in the component view, does not get compiled with them.

So, how can I do this without using the modules?

Hello

You can use mxml for each of your points of view so that the tab that you load the "vision of component/mxml', you may have all conditions for which is replaced and is not - the following is a simple example

David.

the App

======

http://ns.Adobe.com/MXML/2009.

xmlns:s = "library://ns.adobe.com/flex/spark".

"xmlns:MX ="library://ns.adobe.com/flex/mx"minWidth ="955"="600"xmlns:local = minHeight" * ">

Import mx.events.FlexEvent;

Import mx.events.IndexChangedEvent;

protected function tn_changeHandler(event:IndexChangedEvent):void

{

var myObject:Object = tn.getChildAt (event.newIndex);

Switch (Event.NewIndex)

{

case 0: (myObject as NavigatorContent) .addElement (new comp1());

case 1: (myObject as NavigatorContent) .addElement (new comp2());

}

}

]]>

Page 1 (comp1.mxml)

================

http://ns.Adobe.com/MXML/2009.
xmlns:s = "library://ns.adobe.com/flex/spark".
xmlns:MX = "library://ns.adobe.com/flex/mx" width = "400" height = "300" >
page 2 (comp2.mxml)
================
http://ns.Adobe.com/MXML/2009.
xmlns:s = "library://ns.adobe.com/flex/spark".
xmlns:MX = "library://ns.adobe.com/flex/mx" width = "400" height = "300" >

Tags: Flex

Similar Questions

  • I need to reload icons and the new tab, which disappear somehow.

    I figured out how to get the tab reload but not yet able to get the new tab in my toolbar. It is not available in the customization options. Help, please.

    Perhaps localstore.rdf is corrupted?

  • Application & quot; freezes & quot; on the change tab or accordion

    Hello

    We have an intranet application with a main tabnavigator, sub tabnavigators and sometimes accordions in those.

    But now and then it freezes when you change from one tab to another or one accordion to another and shows not the content of the tab or the browser, but a white - blank screen. And there is no errors generated. Not even with the debug player...

    Any ideas what could cause this? I know it is a very imprecise error which could have a thousand reasons, but maybe someone here had the same problem...

    Best regards
    Frank

    Hello

    Seemed that our problem was caused by infinite loops. Each tab has a "show" - function. Some of them were called twice thus causing the problem...

    The use of the debugger in Flex is the answer...

    Best regards
    Frank

  • as Google Chrome don't translate all the current page in the same tab.

    Hello

    For a few years, I use Google Chrome, it's one of the reasons...
    Now, I would like to change it to Firefox if it could be possible.

    Is it possible to translate a page in the same tab were open, as the Google Chrome browser?
    I tried the translator-ImTranslator addons, or QGTranslate or Google Translator for FIrefox and all translate the page to open in a new tab, and it does not at all help me.

    I really need because I connect to some Web sites, and if the change tab translator, I are not more registered in the new translated tab open.

    Thank you.

    Try this bookmarklet:

    Note that this requires Flash and a (temporarily) for mixed content in the current versions.

  • Change tab

    Hello

    We will have a problem when we try to get the information of the change tab with a MAXL script.
    We see in the change tab which the start and end time are in the format "day MONTH YEAR" (because the language is Spanish) for the three "type of operation" (calculation, loading data, updated hierarchical).

    But when we enter this spirit of information a MAXL script with the phrase 'display bases BBDD. APP request_history; "we get in the fields 'request_start_1', 'request_end_1', 'request_start_2', 'request_end_2', 'request_start_3' and 'request_end_3' this date in the format" sat Oct 15 06:19:52 "(par exemple), but the YEAR does note appear and we do not know the reason." "

    Are you looking for us using an incorrect sentence MAXL?, how can we get the date of the year?

    Thanks for your help.

    I think it's just a matter of column width. The default value is 20 characters - try to use the following first:

    set column_width 30;
    
  • I am not happy with the new menu bar. I made a mistake in the change. Want to use the button refresh or open a new tab when requested without

    I made a mistake some how. I'm not the best a computer news as the new avg with the research changes. I want to return my old menu bar. I want to be able to open a new tab without going through an open search window. I don't like new tiny 'file above it don't help me. I want the option to click the Refresh button bit. How to get back to what I had before?

    I don't know what happened to your menus and toolbars. Has this happened after an update of Firefox, or a change in your add-ons?

    (1) you can switch between the Firefox button orange with its abbreviated menus and the classic menu bar, by using the following text:

    ALT + v (open the menu Classic view) > toolbars > Menu bar

    (2) in the new tab, you wanted it is empty? Are there currently AVG research? If you want to get rid of the search for AVG, you probably have to disable to remove one or more modules from here:

    Orange Firefox button or classic menu Tools > Modules > category: Extensions

    Does make a difference?

    (3) the reload button is nestled at the end of the address bar, after the star icon and the drop-marker. If you prefer that your button to reload on the bar itself, you can do that using the personalization feature.

    ALT + v (open the menu Classic view) > toolbars > customize

    In order to avoid the button reload to slip into the URL bar, you can perform the following actions:

    • Move the button reload for the left side of the address box
    • Move another button between the address box and reload
    • Move another button between the reload and stop buttons
    • Reverse the order of the reload and stop buttons

    You can get as you wish?

  • 41 of Firefox. Stop posting the story on the new tab. I want the new tab to display Google as my home page. In this way, and something changed.

    I'm on firefox 41. When I select a new tab, I get displayed story. This has changed today. I don't know what I changed to create this problem. He has always displayed Google as my homepage with no history and no new proposed apps. How can I get that back to this point. Firefox deleting then reinstalling would resolve the issue.

    Hi, 41 of Firefox, you must use an add-on like tab override (browser.newtab.url replacement), to make changes to the page tab.

    Once installed, open the Add-ons (Ctrl + Shift + A) Manager > Extensions, and then look for the new tab override and click Options to set your preference.

    Note, if you want only the new tab to be the same as your home page, you can use the Add on new tab homepage instead.

    You will then need to restart Firefox for all changes to take effect.

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • Yahoo appears when I press the new tab now and continues to do so even if I change it back

    I tried the subject: config and the removal of Yahoo / change in about: newtab - it works, but in about 30 minutes, it is for Yahoo. I checked add-ins and extensions, and the only thing I'm running is Norton. I even tried to go back to the original version of Firefox, in case Yahoo has uploaded a new modified version, and that seems to work, yesterday. But today, when I clicked on the new tab - Yahoo back again. Nothing to do, it seems made a difference - it's worse than a virus, as it seems to keep regenerating itself. Can anyone help please?

    I have "think THAT"I could find a resolution. I included here for info to others.
    Went to the control panel in Windows
    Choose to uninstall a program
    Clicking the column installed on everything in date order.
    Noticed that at the same time I installed another piece of software a 2nd piece has been installed without my permission. It was called Hub a lot of results.
    Selected many results Hub and uninstalled.
    To do this, I noticed that it closed Firefox.
    After uninstalling, I restarted the PC, just in case he left something in memory
    Then once it restarts again, I uninstalled Firefox (tbh, I probably didn't need to do that, but wasn't any risk)
    Rebooted again (probably no need to do)
    Once the PC itself started, I installed a version of Firefox.

    Now, fingers crossed, it worked. If it has, I'll come back here tomorrow and this will mark as resolved.

  • How can I change the new tab landing page? I would like to see sites recently seen in thumbnails.

    When I click on the sign '+' for a new tab, I would see field of search google with visit Web sites below.

    Hello

    It seems that a parameter has been changed on your new tab page. These changes are usually caused by bars of third-party tools or modules. I understand that you would like to know how to reset it. No problem, please follow the steps below:

    1. In the address bar, type Subject: config and press enter. The "this might void your warranty!" warning page may appear.
    2. Click on I'll be careful, I promise! to keep the comments: config page.
    3. Type browser.newtab.url in the search box to find it on the list.
    4. Double-click on browser.newtab.url and type on: newtab in the window that opens.

    Restart Firefox and open a new tab to ensure that the change has been made. If there is no problem with the plugins please see also: troubleshooting questions with plugins like Flash or Java to solve common Firefox problems

    Please post back with your results, we are happy to help you.

  • How can I change the default zoom for the new tab only?

    The new tab in Firefox 33 zoom is too high to see all 12 of my thumb nail. I changed it using ctrl - but the next time I opened a new tab, the zoom is 100%. How can I change the default zoom for the new tab only?

    I posted a style rule to shrink the tiles, which allows several of them on the page, but naturally reduces their legibility. You can experiment with the dimensions to find a look that works for you.

    https://userstyles.org/styles/106326/shrink-new-tab-thumbnails

    I use the Stylish extension to experiment because of its preview function that allows me to see the effect quickly. You can install it from the site of modules, then after restart of Firefox while searching for his "S" icon in the toolbar to manage Styles so you can edit and experiment.

    https://addons.Mozilla.org/firefox/addon/stylish/

  • I have a lot of tabs saved to be able to open them when I open Firefox, but the first tab is always changing in my homepage, Google. Is it possible to stop this?

    I always opened, 20 + tabs on Firefox and it is together to remember. However, when I open Firefox the first tab changes that I had opened it in my homepage, Google. I can use the thing "go back" to go to the page that I had there, but going back to Google every time I restart the browser that becomes tedious.

    The only way to solve what I've found is to just stop trying to use the first tab and either Google. However, I want a real solution stop if possible.

    Who are normal tabs or pinned tabs?

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • I like my tabs down and changed the browser.tabs.onTop to false, but the tabs are always on top. Why?

    Go to about: config and changed tabs on top for false but tabs are always on top.

    Well, it is a bit of information that would have been helpful to forward. Enough criticism, wouldn't you say?

    In any case, it worked, and I now have tabs on the bottom. Thank you.

    And somebody had to hit Firefox developers who continue to take away the feature at the side of the head with a 2 x 4. Apparently, they won't have to 'do' another way.

  • When I click on a link that I searched in a search engine a new faucet is opened. How can I change it so that it remains in the same tab, in that I tried

    When I click on the link in a search engine. allows you to use Google for instance and say that I find the camden wyoming fire company. When I click on the link to the website a new tab opens with the web site. . How can I change it so that it uses the same tap in that I tried

    Hello to bratman0, by default google results should already open in the same tab, if they don't please ensure that you have not set to open a new window browser for them within the parameters of google: https://support.google.com/websearch/answer/425

  • Hit the tab key changes the withdrawal. How can I do tab take the cursor to the next tab stop?

    Currently in the latest version of Pages, the tab key changes the line indent. How can I take the cursor to the next tab stop? The document was created in Word format. I work with Yosemite 10.10.5 on a MacBook Pro with 8G of RAM and hard disk of 1 t.

    The removal of default tab in v5.6.2 Pages is 0.5. You have formally the additional tab stops in Text Format: Panel layout, or with your ruler displayed or clicked on it to set the tab indents?

    Pages is not a clone of the word and the Act to translate automatically the Word document to the internal .pages format when opened by Pages - may or may not honor prior model and Word document settings.

  • 23 FF has a tab in the upper left corner. I made the change of url to empty, but it's still there. How can I get rid of it for good? W7 Ultimate

    F 23 has a tab box in the upper left corner. I made the change of url to empty, but it's still there. How can I get rid of it for good? W7 Ultimate. There was no box in another version of FF.

    Hello, apparently this option has been removed intentionally in preparation for a redesign of the browser which will land in firefox later this year. You can use the following extensions to work around this issue if: https://addons.mozilla.org/firefox/addon/hide-tab-bar-with-one-tab/

Maybe you are looking for

  • Where can I buy a spare for a 2006 MacBookPro battery?

    Where can I buy a spare for a 2006 MacBookPro battery? preference online. Craig

  • Satellite L50 - Win 8.1 - passage of the CSM in UEFI?

    Hi guys. Yesterday, I upgraded my Toshiba Satellite L50 with an SSD.I installed windows 8.1 and everything seems to be ok... except a little thing... When I booted the usb to install windows 8.1 my bios has been installed in the CSM (because I read t

  • Random minimizing full screen games (elements windows unfocussing)

    Nothing wrong with my system by saying, no virus or spyware registry anywhere, audit, no unwanted services etc running. But for some reason, things minimize or unfocus (i.e. active windows goes gray). So, im a bit lost as to why, as said nothing fish

  • GFWL lost details

    Hi all My email address that I use all the time has been installed years ago and was when I was living in the United States. My first tag gamer has been associated with this address. Now I'm back in Ireland and I couldn't use the same address to buy

  • Sensor of HDX footprints: how to retrieve the attempt to update driver?

    HP HDX18 - NK148AV W7 Ultimate (64-bit) Through drivers available in S & D section looking for updates that can fix various annoyances.  Picked prints digital driver 1.3.1.183A AND Fingerprint Software 4.0.1.3749_64A.  Install the driver then the ap