1 Reply Latest reply on Mar 20, 2011 6:34 AM by haroon ghafoori

    Unable to set ViewStack's selectedIndex dynamically

    Ameya Mogare

      Hi,

       

      I am developing a SAP Web Dynpro Flash Island that contains a ViewStack with 2 HBoxes.

       

      Depending on value from Web Dynpro, ViewStack should render either of 2 HBoxes.

      And note that this selectedIndex wont change during session.

       

      [Bindable]

      Public var childInViewStack : int;

       

      I have tried putting this selectedIndex setting logic in several lifecycle methods of ViewStack (preInitialize, Initialize, updateComplete, creationComplete).

      But I see random behaviour. It sometimes show HBox_0 and in most of the cases it shows HBox_1.

       

      Note that in all my test cases, Web Dynpro is sending childInViewStack as '0'. But Flash always shows HBox_1!!!

       

      Any idea why is it happening?

       

      Please help. I am stuck with this issue since a week now.

       

      Thanks and regards,

      Amey