For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hi - We have an application in which I have an ADP that is initialized with values on page load. This ADP is then used to display data in the UI in a table. Trouble is, the table only shows a few rows and no scroll-bars even. The same data when instead fetched using SDP and attached to the table, it shows all rows (no scrollbars even now but at least it shows all rows). What am I missing here please? I would need to see all rows on the table with the ADP. I have to use ADP as I am manipulating data in code and mutating it back to show on the table. Thanks!
Hi Monosij
Looks like this is a pagination issue, with SDP it's implicitly taken care and when you scroll it will fetch more records from db/bo.
ADP will show 25 records by default or the limit you have set while calling the REST, you have to implement pagination explicitly for ADP.
Regards,
Preetesh
Monosij
You would need to have a button/link like 'show more' and call the rest every time by setting offset value for the call and keep on appending your ADP with result. 'hasMore' will help you in identifying if there are more records available to be fetched.
You can get many pointers on how to use offset with rest call.
Regards,
Preetesh
Are you using VB Business Objects or another data source?
Check the network tab in your browser for the request being sent to the service.
(Basics here - https://blogs.oracle.com/vbcs/debugging-and-troubleshooting-visual-builder-logic)
Does the request being sent on the URL include a limit parameter?
In the console you can see how many records are being assigned to your ADP - does that number match the limit?
If you set the scrollPolicyOptions.fetchSize attribute on your table to a larger number do you get more rows?
https://www.oracle.com/webfolder/technetwork/jet/jsdocs/oj.ojTable.html#scrollPolicyOptions.fetchSize
Hi - Yes it is a VB BO. Infact what i am doing is very similar to what you show here. (https://blogs.oracle.com/shay/using-checkbox-to-select-rows-in-a-table-in-visual-builder).
Checked the network tab, there is no parameter being passed in the request. However when I see the response, it does show that there is a fetch size of 25. As attached in the picture. ADP is also getting assigned 25 records. Changing scrollPolicyOptions has no impact at all.
Anyway to increase the fetch limit?
Can you set style="height:500px" for the table and see if it helps?
Can you post the HTML code for your table?
More info here:
https://blogs.oracle.com/shay/table-pagination-and-scrolling-in-visual-builder-explained
Hi - That seems to introduce a scroll-bar but the number of records seem to still be restricted to 25. Somehow, the REST call to the VB BO seems to only fetch and assign 25 records to the ADP. I have done exactly as you show in the blog i referenced if that is of any help.
Table html code below
<div class="oj-flex">
<oj-table summary="Sample Table" id="oj-table-1084591017-1" data="[[$variables.RevalTemplateADP]]" columns='[{"headerText":"Selected","field":"selected","template":"selected"},{"headerText":"Name","field":"name"},{"headerText":"Description","field":"description"},{"headerText":"Request Id","field":"request_id"}]' scroll-policy-options.fetch-size="200" scroll-policy-options.max-count="600" style="height:500px" class="oj-flex-item">
<template slot="selected">
<oj-ext-checkbox-switch :id="[['oj-ext-checkbox-switch-1084591017-1-' + $current.index]]" value="{{ $current.row.selected }}"></oj-ext-checkbox-switch>
</template>
</oj-table>
</div>
Set the size transformation parameter on your REST call to be a high number - this should impact the limit parameter passed to the REST endpoint.
Set the size transformation parameter on your REST call to be a high number - this should impact the limit parameter passed to the REST endpoint.