3 Replies Latest reply on Jul 24, 2008 11:55 PM by SujitG

    Implement forms in different .mxml files

      I'm starting developing an application with Flex wich will have differente views. I wonder if it is possible to implement each view in a different .mxml file and how to do it. I now it is possible to define states but what I want is to define different forms (that probably would have states).
      Any help will be appreciated.

      Thank you.
        • 1. Re: Implement forms in different .mxml files
          Gregory Lafrance Level 6
          In this case ViewStacks may be better for navigation, though changes in forms are often also implemented using states:
          • 2. Re: Implement forms in different .mxml files
            Rob Rusher Level 1
            Yes, you can create separate .mxml files for just about anything. So you could create a new .mxml for each "form" view where <mx:Form> is the root of each file.
            States apply only to the file they are defined in, so you can have a form with different states based on form item selection. I can then nest components with states within on another.

            Also, as Greg points out, "States" are not used for navigation, that is what the navigator containers are for. (i.e. ViewStack, TabNavigator, etc...) States are for modifying a component slightly based on an event.
            Using your example, if a user selects a specific option in a ComboBox, you add another TextInput to the form. In a more generic example, you display a catalog of products. When the user mouses over a product, the image is highlighted and an add to cart button appears.

            • 3. Re: Implement forms in different .mxml files
              SujitG Level 2

              This forum category is created for developers who are learning Flex using FLEX IN A WEEK training found at this URL


              Please use this forum for discussing topics related to FLEX IN A WEEK video training courses only. For any other discussion please use the Flex General Discussion category or any other appropriate category.

              Thanks for co-operation and apologies for any inconvenience caused.