How to handle the huge data(>10 million) in sapui5

2019-08-02 21:03发布

问题:

I am using sap ui5 oTable for showing the huge data from hana db. While loading the huge data, the browser is going to crash.So I am fetching 100 records from db and showing the 20 records per page.So we can have 5 pagination(5*20=100) with one manual next button. If I click next manual button, I should get next 100 records and pagination should be 6,7,8,9,10.but i could not change the pagination no.

  1. How to change the default pagination number in oTable?
  2. How to achieve lazy loading concept in oTable?
  3. Normally how to achieve the huge data handling in oTable?

回答1:

Your question is a bit cryptic

Q: If you are asking, why does the odata call only return 100 rows at a time?

The ODataListBinding which populates the table uses the model size limit, which by default is 100, this number is then used in the OData Query populating the $top and $skip query options

eg $top=100 $skip=0

returning the first 100 rows only

Q: How do i change the size limit to bring back more than 100 records

oModel.setSizeLimit(999999)