0
votes

Is there a way for the SAPUI5 TreeTable to not call the OData web service on each node expansion? I've tried setting the operationMode parameter to client as part of the data binding, but it still retrieves the data via individual web service calls for each node expansion. Currently running SAPUI5 1.28.45.

The model is of type sap.ui.model.odata.v2.ODataModel and set globally. I've tried configuring the default operation mode on the model without success and toggling batch mode without success. It's set up for two-way binding as well.

I'm currently setting the operation mode as below with no luck:

this._oTable.bindRows({
    path: '/EventSet',  
    filters: self._aFilters, 
    parameters: {                   
        countMode:'Inline',  
        operationMode: sap.ui.model.odata.OperationMode.Client // Seemingly ignored
    }
});
1

1 Answers

0
votes

You could try to use JSONModel Binding instead of ODataModel Binding.

You can get the content of the EventSet with a Read function https://sapui5.hana.ondemand.com/#docs/api/symbols/sap.ui.model.odata.v2.ODataModel.html#read Then in the Success function you take the result, create the JSONModel, convert the data into something that the TreeTable can use, set this to the JSONModel, set the JSONModel to your TreeTable Object (eg.): this._oTable.setModel(oYourJsonModel, sModelName); this._oTable.bindRows({ path: "/", parameters: { arrayNames: ["additionalData"] } });

Here you can find information about JSON Tree Binding: https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.table.sample.TreeTable.JSONTreeBinding/preview

Hope it helps. Best regards, Adrian