0 Replies Latest reply on Nov 23, 2009 1:35 PM by DilipShah

    how to invoke updateDisplayList method in the custom layout?

    DilipShah Level 1

      I've a group of buttons that get placed in a SkinnableDataContainer with the help of a custom layout class as follows:

       

      <s:SkinnableDataContainer id="buttonsContainer"
          dataProvider="{appModel.myButtons}"
          width="{DIAPLAY_WIDTH}" height="{BUTTON_HEIGHT+4}"
          skinClass="view.skins.ContainerSkin"
          itemRenderer="view.renderer.MyButtonRenderer"
          click="startPointAreaClickHandler(event)"
          mouseMove="areaMouseMoveHandler(event)"
          mouseUp="areaMouseUpHandler(event)"
          rollOut="areaMouseOutHandler(event)"
          >
          <s:layout>
              <layout:ButtonsLayout />
          </s:layout>
      </s:SkinnableDataContainer>

       

      myButtons is an ArrayCollection of VOs and VO has x and y coordinates as fields. Values of x and y determine the location of the button. When I add an object to myButtons, the application behaves as expected (adds a button in buttonsContainer at specified x and y coordinate). But when I just change values of x and y of an existing button, the buttons don't get repositioned. I have tried calling invalidateDisplayList on buttonsContainer but that doesn't trigger updateDisplayList method in the custom layout ButtonsLayout.

       

      How do I trigger updateDisplayList method in the custom layout so that the button positions get updated whenever an event changes values of x and y of a button?