1 Reply Latest reply on Jan 5, 2013 11:37 AM by l33tian

    Refreshing or reseting data in item renderers

    l33tian Level 1

      Hello all,


      I've been on this issue for about 3 days now, I have googled and nothing is helping at the moment. I have a tree with a custom item renderer that represents different groups of information(Company, Roles and Groups), In this tree, each branch has a different datatype(CompanyInfo Object, Roleinfo Object and GroupInfo Object). The strong typed objects are used to build the tree with CompanyInfo being the root and containing RoleInfo Objects as children which could in turn contain GroupInfo Objects.  At each level, the item Renderer for the tree has a label that displays a total of all users under for that Company, Role or Group. All this works fine as the following code fired by creationComplete handler detects the data type of the data and gets a sum total for that level



      if( data is RoleInfo ) 
      else if(data is GroupInfo)
      else if(data is CompanyFolder)


      Now the count variable is scoped within the class itself, but the problem arises when the data provider for the tree changes in which CompanyInfo Object changes and could have different number of roles and groups under it. When this change happens, i can still see traces of the previous data mixed with the new data, Is there any way to reset the item renderer so that the new values can display properly?


      Any form of help will be greatly appreciated