我以前Aggregation Binding來解決這個問題:
//worklist.controller.js
onInit : function(oEvent) {
const oView = this.getView(),
oModel = new sap.ui.model.json.JSONModel(),
oTable = oView.byId("table");
oTable.setBusy(true);
oModel.loadData("getData?Date=" + new Date());
oModel.attachRequestCompleted(function() {
oTable.setBusy(false);
});
//Set a name for oModel so that it won't confused with my mainService
oView.setModel(oModel, "myModel");
},
//worklist.view.xml
<Table
id="table"
items="{
path: 'myModel>/'
}">
<columns>
<Column><Text text="ID"/></Column>
</columns>
<items>
<ColumnListItem>
<cells>
<Text text="{myModel>ID}"/>
</cells>
</ColumnListItem>
</items>
</Table>
我認爲這是沒有可能的,從這個配置。你需要在URl的日期擺脫緩存的數據?如果將maxAge設置爲0,會有幫助嗎?用於緩存的 –
您應該使用不同的機制。你想達到什麼目的? – Jorg