0 Replies Latest reply on Apr 15, 2010 6:22 AM by P.o.l.a.c.o

    ArrayCollection merging and Objects update

    P.o.l.a.c.o Level 1

      Hi,

       

      I wonder if there is a common way or something provided in the framework to handle objects update.

       

      For instance suppouse you have and application that displays a list of Cars, and you want to update that list each 1min automatically since some cars gets busy, offline, etc (each item list displays car number and status icon).

      Also you want to allow users to select a car to make another request and bring details of the car status like gps position, status, fuel, driver, list of recent trips... (this car details also must be updated each one minute)

       

      Now if I make a request to update the cars list and clear the ArrayCollection that contains the cars displayed by the list and fill it with the new data, that will force the List to be refreshed loosing for instance selected car and other issues. Also if I get all the car details and step over the last details all the details component data will be redraw. So it seems that the way to go is not to completly replace the objects but update it's properties or elements.

       

      So the question is, There is any common way to update this elements without having to code that update myself? Is not that I'm lazy but maybe there is a best practice to do that or something.

      (I'm not using Blaze or LiveDataCycle)

       

       

      thanks in advance.

       

      Polaco.