Kenny,
  I think States would be a better fit for what you are trying to do. Regardless, you could have the viewstack selected property index set to a bindable value....
so,
selectedIndex="{model.accessLevel}"
 
And in your ModelLocator (Cairngorm [Bindable] singleton)....
 
accessLevel : Number = 0;
 
Then, any part of your application could update the value of the accessLevel attribute, say to 1, which would automatically make the screen change to the next View.

lostinrecursion <[EMAIL PROTECTED]> wrote:
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



Get your email and more, right on the new Yahoo.com __._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to