2 Replies Latest reply on Mar 17, 2011 9:27 PM by Ameya Mogare

    Initializing ViewStack's selectedIndex

    Ameya Mogare

      Hi,

       

      In a Flash island, I have a Viewstack who's selectedIndex property I want to control based on input from Web Dynpro.

       

      I have a following two variables: -

       

                  public var isPilotUser : String;
                 
                  [Bindable]
                  public var childInVS : int = 1;

       

       

      Now if 'isPilotUser' is "Y", I want my Viewstack's selectedIndex = 0

      and if it is "N", I want selectedIndex = 1.

       

      Now where should I write this logic?

       

      May be in preInitialize() method of Viewstack?

       

      Please help.

       

      Thanks and regards,

      Amey