1 Reply Latest reply on May 28, 2010 5:10 AM by Dajji

    Each State consisting of a new Conatiner

    kiran7881 Level 1

      Hi ,
      I have seen a example regarding View states , where the coding is in this way :
      An Application container consisting of two states , where in each state there is a Form Added , something this way shown below :

      <mx:Application>

      <mx:states>

      <mx:state name="Login">
      <mx:addChild>
      <mx:form name ="LoginForm">
      // Some componets with respect to Form Container here
      </mx:form>
      </mx:state>

      <mx:state name="Register">
      <mx:addChild>
      <mx:form name ="Register">
      // Some componets with respect to Form Container here
      </mx:form>
      </mx:state>

      </mx:states>
      </mx:Application>

       

      This works fine and looks nice .

       

      I am having a question here "Is this type of coding is nice ??"

       

      will this make sense as i read that states help in maintaing different views with same conatiner , but in this example the user is creating a new conatiner for every state ??

       

      Please share your ideas .

       

      Thanks for reading .