Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

103
Views
Dynamically change sap.ui.table row binding behaviour

There is requirement to change behaviour of sap.ui.table depending on no. of rows present in backend being binded to table and a threshold value set. So if no. of rows are less than threshold value, then load all rows data and sorting/filtering done in browser i.e operationMode Client.

But if large no. of rows present exceeding threshold value then load with $top/$skip and sorting/filtering should trigger backend call i.e. operationMode Server.

As per documentation operationMode Auto should have worked but it keeps the sorting/filtering always on Server side irrespective of few rows present which are less than threshold value and so not working purely as Client operationMode.

Is there a direct way in XML view binding to change operationMode to Client/Server depending on count condition or operationMode injected conditionally in

<Table id="myTable"  threshold="200" visibleRowCount="10"  minAutoRowCount="10" 
rowHeight="40" 
visibleRowCountMode="Interactive"
rowSelectionChange="onTableChange" 
rows="{path: 'SampleEntitySet', parameters: {expand: 'Test123', operationMode : 'Server'}, events: {change: '.onTableChange'}}">
            
            

Please help in suggestion to solution. Thanks

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

The question points to OperationMode.Auto (https://ui5.sap.com/1.102.1/#/api/sap.ui.model.odata.OperationMode) which had been pointed out in a comment already. However, that OperationMode is not fully functional (likely since a long time) and is deprecated as of SAPUI5 1.102.

It makes sense to understand why you want to have such a differentiation in behavior. OperationMode.Client can be used as an optimization in case the data volume is small. This will mostly optimize the load caused on the backend. The user may not be aware of the difference unless the network to the backend is bad. And even the load for sorting or filtering on the server is not a real issue if the data volume is small. So the question is whether there is actually another issue hidden behind the question and it makes sense to work on that issue.

about 4 years ago · Juan Pablo Isaza Report

0

The "threshold" should be defined as a binding parameter, not as a property for the table. e.g.

oTable.bindRows({
    path : "/Categories",
    parameters: {
        operationMode : "Auto",
        countMode : "Inline",
        threshold: 9
    }
})

Please see the jsbin below and set the threshold property less than 8 to see the batch request for the sorting of the CategoryName column (Server mode) or set it bigger than 8 to see the Client mode in action. https://jsbin.com/wutiyudoru/1/edit?html,output

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!