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.
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,
I think you sholuld put this (selectedIndex setting logic) inside the resultHandler of the service that is retrieving the this information(selectedInex). Also as the default selected index of ViewStack is 0, to avoid displaying this default chiled you can keep the ViewStack invisible and make it visible in after setting the selectIndex in the resultHandler of the service.