openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Missing ECD Samples

Open dfenerski opened this issue 4 years ago • 6 comments

I got curious about the Extended Change Detection mechanism.

A quick google search yielded no samples, are there any that I am missing?

For developing controls, aggregation modifier methods have to be implemented and without samples we are left with only the default ones in the source code of e.g. sap.m.ListBase.

Also, in order to have bDetectUpdates === true, a template has to be provided (as per source code) Why?

dfenerski avatar Dec 06 '21 10:12 dfenerski

@dfenerski sorry for not yet answering your recent comment in #1162 . I wanted to check with colleagues whether we have some code sample, but AFAIK, the documentation chapter is all we have, besides the controls that implement ECD.

Wrt. bDetectUpdates: one idea of ECD is to reuse clones inside an aggregation. If a binding uses a factory function, not a template, then this function is opaque for the framework. It's not clear whether property updates in the bound data might result in a different return value of the factor function. Therefore, bDetectUpdates is set for a binding with a factory function (note that the code checks for !oBindingTemplate). The list binding then will deep check the values to detect inner updates and will execute delete + insert operations rather than reusing the old item. This, btw, is mentioned in the above ECD docu:

... This is especially relevant when a factory function is used to create child controls, so depending on the data a different control may be created by the same entity.

codeworrior avatar Dec 06 '21 10:12 codeworrior

Thanks for the info!

It would be great if we could have a sample.

In the meantime, if I find the time needed to put one together myself, I can post it here (perhaps a codepen or something similar).

dfenerski avatar Dec 06 '21 13:12 dfenerski

Hello @dfenerski , Thank you for sharing this finding. I've created an internal incident 2180423470. The status of the issue will be updated here in GitHub. Regards, Florian

flovogt avatar Dec 17 '21 08:12 flovogt

Hello @dfenerski, we discussed the issue and we will handle this topic in the backlog item CPOUI5FRAMEWORK-340. Thank you for bringing up this topic.

flovogt avatar Jan 21 '22 07:01 flovogt

Hello @flovogt ,

Has there been any progress on this issue ?

Thanks and BR

Dimitar

dfenerski avatar Aug 26 '22 18:08 dfenerski

Hi @dfenerski , no progress so far. We have prepared and planned the topic. Currently, topics with a higher priority are in work. I can not promise any timeline for finishing this backlog item.

flovogt avatar Aug 29 '22 06:08 flovogt