Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Collection reset issue

Dan CurtisJan 14 2019 — edited Jan 14 2019

Hi,

I have an issue with the .reset function on a collection, specifically when using it for a list view. It only occurs within JET 6.0.

When removing the first item from the collection and allowing the list component to update, an error is thrown in the console:

error.png

After some digging, I found that the code that was causing the issue seems to lie within ojlistview.js and specifically the validateKeys function rather than the ojcollectiontabledatasource. The validateKeys function is calling a function within ojcollectiontabledatasource called 'containsKeys', but is passing the ID of the first item that is no longer within the collection, so that causes the error.

I have attached a really simple sample application here: https://we.tl/t-TiIreLtzcO Click the button to remove the top item from the list with the web console open to see the error.

It is possible to stop the error in the sample application by calling a refresh on the list view directly after the reset, which seems to work. However, in my actual code the reset is happening inside of a web component, so by the time the refresh can be called the error has already occurred.

Has anyone else experienced this, and know of any workaround?

Thanks!

Dan

Comments
Post Details
Added on Jan 14 2019
1 comment
242 views