Javascript 如何禁用sap.m.表上的忙指示灯?
我有一个Javascript 如何禁用sap.m.表上的忙指示灯?,javascript,sapui5,Javascript,Sapui5,我有一个sap.m.表,正在对其执行刷新。但是,在提取数据的过程中,表会变为非活动状态,这不是必需的结果 我尝试设置enableBusyIndicator=“false”,但它所做的只是不显示忙指示器,但在该持续时间内,该表仍处于非活动状态 <Table id="myTableId" inset="false" growing="true" items="{path: 'model>/entityset',sorter: {path: 'someProperty', desc
sap.m.表
,正在对其执行刷新。但是,在提取数据的过程中,表会变为非活动状态,这不是必需的结果
我尝试设置enableBusyIndicator=“false”
,但它所做的只是不显示忙指示器,但在该持续时间内,该表仍处于非活动状态
<Table id="myTableId" inset="false" growing="true"
items="{path: 'model>/entityset',sorter: {path: 'someProperty', descending: true}, filters: []}" mode="MultiSelect"
selectionChange="onRowChange" updateFinished="updatingCount" enableBusyIndicator="false">
我还可以看到有一个名为
setBusyIndicatorDelay
的方法,但是即使我将1000000
传递给它,它的行为仍然相同。在控制器中为事件更新完成声明此回调:
updatingCount: function(oEvent){
oEvent.getSource().setBusy(false);
}
<Table id="myTableId"
inset="false"
growing="true"
mode="MultiSelect"
selectionChange="onRowChange"
updateFinished="updatingCount"
enableBusyIndicator="false"
busy="{LocalJSONModel>/isTableBusy}"
items="{
path: 'model>/entityset',
sorter: {
path: 'someProperty',
descending: true},
filters: []}">
下面是我们在这里要做的-获取事件的源,它是我们的sap.m.Table实例,然后我们调用源上的方法setBusy,以隐藏忙碌指示器
您还可以为XML视图中sap.m.Table的busy属性绑定一些模型属性(例如应用程序的本地实用工具JSONModel):
updatingCount: function(oEvent){
oEvent.getSource().setBusy(false);
}
<Table id="myTableId"
inset="false"
growing="true"
mode="MultiSelect"
selectionChange="onRowChange"
updateFinished="updatingCount"
enableBusyIndicator="false"
busy="{LocalJSONModel>/isTableBusy}"
items="{
path: 'model>/entityset',
sorter: {
path: 'someProperty',
descending: true},
filters: []}">
是否异步获取?请尝试调用setBusy(false)。我尝试调用setBusy(false),但刷新数据的动画仍然出现。您好,我已经尝试了这两种方法,并且每当表中的数据更新时,我仍然可以看到动画。您好,您有JSBin示例吗?