7 Replies Latest reply on Jul 6, 2010 2:38 AM by PHANTOMIASA

    Management / Switch of components / screens

    PHANTOMIASA Level 1

      Hello to all!

       

      I am using Flex 4 with Halo and I have a Main.mxml, which looks like Screen1:

      I have groups and contacts. The groups are listed in a tree and clicking on one, the DataGrid shows me all contacts to the selected group,

      The Panel in the right lower corner shows me the groups and contacts with TextInputs and Labels and so I can edit and delete the entries.

      http://ud05_188.ud05.udmedia.de/flex/Screen1.png

      So, everything is okay, I have all (Design and Script) in one mxml, the Main.mxml. But I want to implement a Screen2 which should appear if someone doubleclick on a group in the tree list. The eventListener is already implemented, but I do not know how should I change the screen1 to screen2:

      http://ud05_188.ud05.udmedia.de/flex/Screen2.png

      You see, the screens are from the layout the same, only the content is different. So, what's the best way to switch from Screen1 to Screen2 (and I have to switch back from Screen2 to Screen1)? I only need the ID of my group for switching to Screen2. Then I can update the list/datagrid, ...

       

      The next part will be a Screen3, but the design will be different, only the Header and Footer will be the same.

       

      Does someone have an idea how I can do this? I only created "one-screen-applications" so far.

       

      Thanks a lot in advance & Best Regards.