Switch form state : Form State « Components « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Components » Form StateScreenshots 
Switch form state
Switch form state
          
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Panel title="Sign In" id="signinPanel" fontSize="12">
        <mx:Form id="loginForm">
            <mx:FormItem label="Email:" id="emailItem">
                <mx:TextInput id="emailText" />
            </mx:FormItem>
            <mx:FormItem label="Password:" id="passwordItem">
                <mx:TextInput id="passwordText" displayAsPassword="true" />
            </mx:FormItem>
        </mx:Form>
        <mx:ControlBar>
            <mx:LinkButton id="forgotPasswordLink" label="Forgot password?" click="currentState='RequestPassword'" />
            <mx:Spacer width="100%" id="spacer" />
            <mx:Button label="Sign in" id="signinButton" />
        </mx:ControlBar>
    </mx:Panel>
    <mx:states>
        <mx:State name="RequestPassword">
            <mx:SetProperty target="{signinPanel}" name="title" value="Request New Password" />
            <mx:SetProperty target="{signinButton}" name="label" value="Submit" />
            <mx:RemoveChild target="{forgotPasswordLink}" />
            <mx:AddChild relativeTo="{spacer}" position="before">
                <mx:target>
                    <mx:LinkButton id="signInLink" label="Return to Sign In" click="currentState=''" />
                </mx:target>
            </mx:AddChild>
            <mx:RemoveChild target="{passwordItem}" />
        </mx:State>
    </mx:states>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Set and get form stateSet and get form state
2.Add Form control in stateAdd Form control in state
3.Change form control property in stateChange form control property in state
4.Highlight new added form item during state changingHighlight new added form item during state changing
w___w__w_.__j_a__v__a___2__s.c___o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.