4 Replies Latest reply on Jan 6, 2009 1:10 PM by Sar975

    custom tree renderer refresh

    Sar975
      I have a custom tree renderer:
      <mx:Tree id="geographyTree"
      width="500" height="335"
      dataProvider="{categoryList}"
      labelField="@description"
      folderOpenIcon="{myFolderOpenIcon}"
      folderClosedIcon="{myFolderClosedIcon}"
      itemRenderer="CheckTreeRenderer"
      showRoot="false"
      />
      which displays an expandable list with items that you can check an associated checkbox. When the user checks a checkbox in the list it will update a summary list on the right hand side of the form. If you remove that selected item from the summary list it updates the categoryList which items should be checked or unchecked but does not update the display of the checked items on the left hand side custom rendered tree until I move my mouse over the item which I removed. So my question is how can I refresh this tree object when I remove an element from my right hand side summary list instead of waiting until the mouseover to accurately display the tree? I tried to use invalidateDisplayList(); but that does nothing. Any help is appreciated. Thanks.
        • 1. Re: custom tree renderer refresh
          Level 7

          "Sar975" <webforumsuser@macromedia.com> wrote in message
          news:gju1sa$qgq$1@forums.macromedia.com...
          >I have a custom tree renderer:
          > <mx:Tree id="geographyTree"
          > width="500" height="335"
          > dataProvider="{categoryList}"
          > labelField="@description"
          > folderOpenIcon="{myFolderOpenIcon}"
          > folderClosedIcon="{myFolderClosedIcon}"
          > itemRenderer="CheckTreeRenderer"
          > showRoot="false"
          > />
          > which displays an expandable list with items that you can check an
          > associated
          > checkbox. When the user checks a checkbox in the list it will update a
          > summary
          > list on the right hand side of the form. If you remove that selected item
          > from
          > the summary list it updates the categoryList which items should be checked
          > or
          > unchecked but does not update the display of the checked items on the left
          > hand
          > side custom rendered tree until I move my mouse over the item which I
          > removed.
          > So my question is how can I refresh this tree object when I remove an
          > element
          > from my right hand side summary list instead of waiting until the
          > mouseover to
          > accurately display the tree? I tried to use invalidateDisplayList(); but
          > that
          > does nothing. Any help is appreciated. Thanks.

          How are you removing items from the summary list?


          • 2. Re: custom tree renderer refresh
            ntsiii Level 3
            As Amy asks. Also, what data type is "categoryList"?
            Tracy
            • 3. Re: custom tree renderer refresh
              Sar975 Level 1
              categoryList is of type XML. The summary list is a seperate list object so not so relevant to the solution only that when I remove an item from the summary list I want to trigger the event updateDisplayList of the custom tree rendered which will then correctly display the checked items. Right now this only happen when I move the mouse over the displayed categoryList.
              • 4. Re: custom tree renderer refresh
                Sar975 Level 1
                I resolved my issue. The solution was to reference the tree's invalidateList() method when removing an item from the summary list. This causes the list to refresh the checkboxes state.