0 Replies Latest reply on Sep 22, 2010 8:10 AM by gauravgr8

    flexlib windowshade opened state maintain




      I have flexlib WindowShade component in repeater in my Flex + AIR application.


      <mx:XML id="mainMenuXML">
      <item value="abc" />
      <item value="xyz" />
      <item value="lmn" />

      <mx:VBox width="100%" height="100%">
      <mx:Button label="Button" click="button1_clickHandler(event)"/>
      <mx:Repeater id="rep" dataProvider="{mainMenuXML.item}">
      <flexlib:WindowShade label="{rep.currentItem.@value}" width="50%" opened="{rep.currentItem.@open}">
      <mx:Label text="xxxxxxxxxx" />

      Now in button1 click handler I am appending child in XML(mainMenuXML) resulting adding one more windowshade instance. But the problem is it opens all the windowshade intances.


      I need to maintain the opened states after adding a new windowshade instance. For example: Initially I get 3 windoshades with labels: abc, xyz, lmn all opened. Now I close the xyz windowshade instance(by clicking on the header) Now I click on button which appends child in mainMenuXML and also add a windowshade instance with some label "pqr". But now I see all the windowshade instances opened. But it should be like abc, lmn, pqr should be opened & xyz closed(property opened="false").


      Please help me in maintaining the opened true/false state of windowshade instances.


      I tried to add a property in dataprovider Bindable to opened property of windhowshade but didn't worked for me.


      Thanks in advance