How to reset components

Hello, I need a little help. I created my component won named myComponent1. I have added this feature to the state1 of my application. Now, my component works fine, but I want to rebuild it at all when I change to state2 and return to my app state1. How can I destroy my component and rebuild it again to reset all variables to their initial values?

Thx for the help

Max

Depending on what the component should reset you implement your logic.

private void reset (): void

{

This.var1 = ""; reset a string

perform any other logic here, including visual resets (use the component life cycle

methods to make efficient);

}

protected function

application1_currentStateChangeHandler(event:StateChangeEvent):void

{

event.newState = 'state2 '.

{

reset the State 1

Reset();

}

}

C

Tags: Flex

Similar Questions

  • How to reset the color scheme to the default level in Windows 7?

    I changed the default color of Windows 7 (32-bit version x) system palette, using the personalize > Windows color > link appearance and the dialog that results.   But she did background colors of controls like buttons, drop-down lists etc. in the dialogs implemented by applications, being identical to the forefront of the font of text on them.  This makes the information unreadable text.   I want to restore the default color palette, so that this information can be read.   I want to know how to reset the color scheme, since other changes in results window customization in unpredictable and unreadable color on other components of the application windows.
    As this resulted in almost total ease of use of my computer, I would be very grateful to anyone who can guide me to reset the color scheme for my computer to its normal state by default as soon as possible.   Thanks in advance.
    -arasan77

    Defects of appearance and personalization,

    http://www.SevenForums.com/tutorials/282-window-color-appearance-change.html

  • How to reset a contextual input fields

    Hello

    This question is asked repeatedly, but the solution that does not work.

    I have a dialog box in a popup defined as:

    < af:popup childCreation = 'deferred' id = 'updatePopup' contentDelivery = "lazyUncached" binding = "#{components ['updatePopup']} ' autoCancel ="disabled ".
    resetEditableValues = "whenCanceled" >
    < af:dialog id = "dc_d1".
    title = "#{"CREATE"eq Bindings.action1.inputValue? viewcontrollerBundle.SERIAL_RIGHTS_MASS_CREATE_TITLE: SERIAL_RIGHTS_MASS_UPDATE_TITLE}" "
    type = 'none' closeIconVisible = 'false' contentWidth = '800' contentHeight = "100" >

    The popup is set with lazyUncached contentDelivery and whenCanceled resetEditableValues. I am it would be enough to reset the fields, but apparently not. In the dialog box (type none is on purpose), I have a Cancel button calling an actionListener:

    Popup RichPopup = (RichPopup) JSFUtils.resolveExpression("#{components['updatePopup']}");

    Popup.Cancel ();

    I also tried popup.hide () the same problem.

    The purpose of components is a card component of link as a scope of the request:

    < managed-bean >
    < description > holder of all component links. < / description >
    components of < managed-bean-name > < / managed-bean-name >
    java.util.HashMap < managed-bean-class > < / managed-bean-class >
    application of < managed-bean-scope > < / managed-bean-scope >
    < / managed-bean >

    So how do reset you the popup/dialog input fields?

    Thank you

    JDev 11.1.2.4

    PS: on a side note, why when I copy paste my code, the editor of the forum will create tables.

    Hello

    Tried with

    ADF RichClient API - af:resetListener

    ?

  • How to reset the forgotten administrator password

    How to reset the forgotten administrator password

    You forgot your password

    Lion or later version

    Reset a password in Mac OS X 10.7 Lion

    OS X Lion mountain - reset a login password,

    OS X Mavericks-solve password problems,.

    OS X Lion-Apple ID can be used to reset your password for the user account.

    For Snow Leopard and earlier with installer DVD

    Mac OS X 10.6 - If you forgot your administrator password.

    OS X - change or reset a password for account (Snow Leopard or earlier version).

    For Snow Leopard and previous without installer DVD

    How to reset your Mac OS X password without an installation disk. MacYourself

    Reset password for OS X without an OS X CD - Tech News and Analysis

    How to create a new account administrator - Mac Hack

  • How to reset AirPort Extreme 10.11.6 OS? How to work with this pinhole? I'm trying to get rid of this flashing yellow light, which began after I installed a new modem from Comcast.

    How to reset AirPort Extreme 10.11.6 OS? How to work with this pinhole? I'm trying to get rid of this flashing yellow light, which began after I installed a new modem from Comcast.

    How to work with this pinhole?

    Usually a paperclip or toothpick or ball pen.

    Stick it in the hole and reset for about 10 seconds until the front led flashes quickly.

    How to reset AirPort Extreme 10.11.6 OS?

    The software method... Unlike the above material method... is to open airport utility and select restore default settings.

    Both methods take you to the same place.

    You can also read the manual...

    Reset to a base station AirPort FAQ - Apple Support

  • How to reset the lost password admin

    How to reset the password for the admin on my mac?

    Restart your mac and hold ⌘R immediately. Keep until the Apple Logo appears. This may take some time for your mac start. Once this is the case, select Terminal in utilities > Terminal to the Menu bar above. Once the terminal appears, type

    ResetPassword

    A password reset Wizard will appear. Select the appropriate account, and enter the new password. Then tap Save. Then, click the apple logo in the corner, and tap on choose Startup disk. Click on Macintosh HD and press ENTER.

    You should now be able to use your new admin password.

    Good luck.

  • How to reset the time to 0:0 seconds to 1 Bar?

    I don't know what I did in my project, but somehow my scale of time lag between my rule of measure.

    The time remains just 0:0 until the playhead reaches 20 Bar of the project then starts counting from 0 there.

    Can someone please tell me how this happens and how to reset so the time progressive count between 0 seconds starting at 1 Bar (instead of starting at 20 Bar as shown)?

    Thanks in advance!

    See below... This should solve your problem...

  • How to reset a password backup encrypted you?

    How to reset a password backup encrypted you? I thought it was the same as my regular password Apple ID.

    You can not.  You must delete this backup and create new backups with a new password encryption or not encrypted backups.

  • How to reset my ipad disable

    My apple ipad is disable, how to reset it?

    I need to reset my ipad disable.

  • I checked automatically do this and now my email pdf files are automatically save. How to reset it

    I checked automatically do this and now my email pdf files are automatically save. How to reset it

    Hello

    You can change this setting in:

    • Tools (or

      ) > Options > Applications

    • Look for 'Portable Document Format (PDF)' and modify however you want the file to process.
  • How to reset the ' do automatically for files like this frome now on "when you save a file, how to reset that?

    I accidentally select "do this automatically for files like this in the future" when opening a file. Now, whenever I open a file, it automatically asks where to save it. First of all, I would like to open it. How to reset?
    Thank you.

    If you can't do this in "tools > Options > Applications" then you can rename (or delete) the file mimeTypes.rdf in the profile folder of Firefox to reset all the actions file.

    You can use this button to go to the Firefox profile folder currently in use:

  • Why my time to send an hour ahead of the actual time and how to reset it?

    When I send an e-mail message, the timestamp is an hour before the actual time.

    How to reset the time?

    You need to reset the time zone of your email account by going to the settings... option or you must be selected your country, city and code postal correctlly... & that is the question of the email provider... For more information I suggest you the e-mail provider is better, th...
    You can check in comparison with any other provider of messaging (e.g. Gmail or yahoo mail)... If your email provider is not helpful, you can always write it here...

  • How to reset a Mac to delivery status?

    How to reset a Mac to delivery status?

    First of all, to save all the files you want to keep (photos, documents, etc.) on a separate drive or in the cloud. Make sure that you are connected to the Internet. After that, follow these steps:

    1. Restart your Mac. Once it restarts and the gray screen appears, press and hold the command and R keys.
    2. Select disk utility, then click on continue.
    3. Select your boot on the left drive and click Delete.
    4. Choose Mac OS extended (journaled) from the Format menu, enter a name, and then click clear.
    5. Select reinstall OS X, click on continue and follow the instructions on your screen.
  • How to reset meter reading in iTunes 12.4?

    After the update, I am unable to reset the account play someone knows a work around or how to reset the meter reading?

    Here's a short AppleScript to replace the missing functionality of time reset. In addition, it erases all jumps, or position of bookmark and the last played and jumped dates.

    Copy and paste into the script editor, save it as LastPlayedNever in ~/Library/iTunes/Scripts. Select one or more tracks and call the script in the scripts menu in iTunes.

    -LastPlayedNever - v1. 0 - © Steve Maguire - 2016-05-18

    say application "iTunes."

    If the selection is not {} then

    set mySelection to selection

    Repeat with aTrack in mySelection

    the value played County of aTrack to 0

    the value played date of aTrack to missing value

    the value ignored County of aTrack to 0

    the value ignored date of aTrack to missing value

    If aTrack is bookmarkable then set bookmark of aTrack to 0

    end Repeat

    end if

    end say



    TT2

  • Re: How to reset the password on the logon screen - Satellite A300?

    How to reset the password on the logon screen?

    I can not access the installation of the establishment or BIOS because I can't pass this screen. Enter something wrong 3 times turns off the computer. I do not have the current password and I don't know what kind of password is and why it s asking one as soon as I turn it on.

    How can I solve this problem?

    You can not fix it. You can only disable it, but to do this, correct password must be known to you.
    As many times before in this forum we have already discussed on this topic.

    Password is very important security feature and we cannot advise how to bypass or remove passwords on the public forum. In other words, each stolen notebook protected by password will be easy to start and access to the recorded data will be easy.

    What is your laptop? You may have purchased this used an and now it is blocked by password?

Maybe you are looking for

  • Cloning a hard drive

    The motherboard on my 2008 MacBook Pro 15 took a fatal plunge. I saved the hard drive and put it in a USB enclosure, tested and it works fine. I have a MBP 15 2009 I picked up someone else in good condition and would like to clone the system and the

  • site Web de W450 do not sync

    Anyone having problems syncing their devices with the Web site. I went to run yesterday, appears on the said device is synchronized and is still not available on the Web site. It's very frustrating. I have tried wireless and cable sync and both say t

  • How to install mssp_am.lex in win.inf for xp

    program in foxpro 2.6 for windows development. I can't use the spell checker in programming mode. An error message mssp_am.lex not installed in win.inf

  • Upload files to dropbox from sony Xperia

    Hello I could not find how to start a new topic on this site extremely complex, so I thought I would leave a new message (not sure who): Recently, all the files (images, audio, etc.) that I'm trying to download from my phone Sony Xperia Dropbox are s

  • The field label text...

    Hello.. I have a LabelField that i shave of the text, but in the filed I should show ' - '. LabelField label = new LabelField ("some text here that should be displayed in the form of (-) '"); But when I access the labelField which label.getText () I