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!

How to Insert New Rows as First Row in Table with BufferingDataProvider

DaveArchMar 10 2021

JET Version: 10.0.0
Hi JET Community
We are using the BufferingDataProvider to track CRUD updates to a table and cannot find a way of always inserting new rows at the first position in the table.
We are using BufferingDataProvider.addItem() to insert the rows however whilst the first row is always inserted at the top of the table (current row index zero), subsequently added rows are placed below that row i.e. row index 1, 2, 3 etc.
What we are trying to do is to always insert every new row at the top of the table (row index 0).
In the Cookbook, there is a demo of CRUD for BufferingDataProvider (Framework --> Data Provider --> Buffering Data Provider --> CRUD) where the same behaviour occurs. The first row created goes to the top of the table and all subsequently created rows are placed under that.
https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=bufferingDataProvider&demo=masterDetail
Interestingly if you select different rows, sometimes new rows are added at different places in the table.
So our question is, what controls where new rows are added and how can we use BufferingDataProvider but always ensure new rows are inserted at the top of the table.
On a side note, a big thanks to the Oracle JET product team for producing such a great UI toolkit and making it free. Sometimes it's easy to forget that!

Comments
Post Details
Added on Mar 10 2021
1 comment
1,125 views