2 Replies Latest reply on Apr 7, 2010 6:25 AM by neypalm

    ItemRenderers and changing the underlying data providers

    neypalm

      Is it possible to change an item in a List's data provider through changing the data property of the List's item renderer?

       

      I know I can get the data provider of the owner of the item renderer, and then just add/replace the item at the specific index, but I don't want the item renderer to need to know so much about its owner.

       

      My specific case is this:

       

      I have some lists (backed by ArrayCollections) that I can drag and drop objects of a certain type between. The lists have the same item renderer, and the item renderers handle the drop event. The data field of the item renderer changes to the dropped object, if it is of the correct type. But this does not change the item in the data provider.

       

      Or is it better to have the drop handler on the owning List, and then figure out which index it is dropped on?