Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

109
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda