I have a flex repeater where there's an expression binding on the instances list. The expression binding is configured as: runScript("self.getInstances()", 1000)
where the getInstances() method constructs and returns a new instances list.
Often, the new list has the same contents as the previous instances list. In this case, are the child components of the flex repeater deleted and recreated? Or are new components only created when the contents of the list change?
Is it really a complete reload, though ?
It seems to me the flex repeater reuses the instances already created.
If you put something in instances that isn't computed from parameters but is recognizable, you can see that it's kept between changes.
I experienced it a few times already, the last time being only a few weeks ago when I was implementing a toast system.
A flex repeater was calling a get_queue function that returned the list of notifications for this session, and used that list as instances.
If I tried removing items from the queue, the next item would take its place but would keep things that were not computed from parameters (ie, a timer bar would keep its progress even though the tile was supposed to show a new notification, causing a clearly visible mismatch).
I had to work around this by hiding expired/closed notifications instead of removing them, and purging the queue when all notifications were hidden.
Or maybe there's something else at play that I missed entirely ?
I thought it wasn't but actually it is !
I went through so many versions of this that my memory got stuck on some older version that did rebuild a new list every time.