Hi,

> even if you reuse all the items, you end up with detaching every item

true, some items will always be detached.

I don't think your nested components should detach the dataProvider. Why do you see the need for that?

Sven

On 08/06/2014 02:56 PM, Guillaume Smet wrote:
Hi Sven,

On Wed, Aug 6, 2014 at 2:32 PM, Sven Meier <[email protected]> wrote:
would it be possible to move the removeAll() call at the beginning of the
onPopulate()
we have to keep the items for reuse, so removeAll() cannot be called a the
beginning of the method.
Point taken. But we could probably keep the items in a local variable
before calling removeAll(), couldn't we?

I may be wrong but if I understand the code well and you imagine you
start onPopulate with detached models:
- depending on the strategy, you might reattach every items and use
their models to compare them;
- then you removeAll() so you detach every item;
- then you render what you need so you end up reattaching the needed items.

AFAICS, even if you reuse all the items, you end up with detaching
every items before reattaching them later which doesn't sound like a
wanted behavior.

I'm not sure it's so easy to come up with an acceptable solution but I
still think there's something fishy here.

Thoughts?


Reply via email to