0 Replies Latest reply on Aug 15, 2006 8:16 AM by I3

    Dynamic ViewStack

    I3 Level 1
      Hi all,

      Quick one, I think. :)

      I have two Components in my application, based on a ViewStack. For the
      purpose of simplicity, let's call them "AdminView" and "UserView".

      Essentially the two ViewStacks contain different screens (or the same
      if applicable) dependent on the access level returned from the database.

      So we've got the application looking like this:

      Application
      ApplicationControlBar (with dataProvider set to a static id of
      "myViews", which will be the id of the loaded stack so that the menu
      displays the correct screens)

      And then I want to load one of the views depending on the access level
      which I will store in the Controller. So the Controller will dispatch
      the event to the view once the access level is set.

      I know how to do that with no issue.

      I just don't know how I would "dynamically" set the MX tag to the
      proper view stack. For example, if it's an admin, the view would be
      <view:AdminView> and if it's a normal user, it would be <view:UserView>

      Any suggestions?

      Thanks so much!
      -Kenny