Hi,
Apologies if this has been asked before, searching for "table no data" brings allsorts up.
I have an odata model to which a table control is bound. Below is an example of the complete URI called to populate the model, and teh view code.
Every 2 seconds I perform an odataModelPilotScoreBreakdown.refresh(). This causes a "No Data" splash image over the table whilst the refresh takes place, not pretty.
I can hide the splash with CSS, but the appearance during refresh is still like a flicker, where table contents disappear momentarily before refreshed with new content.
I would prefer a more silkily smooth update, possible? I can imagine why a refresh might be taking a heavy hammer to the whole table update, but I don't know if model.READ() would be lighter, and would work in my example, as collections are not directly accessible via my Hana calculation view.
Welcome any thoughts, many thanks.
Example complete URI to odata service
View Code
var missionPilotScoreBreakdownUri = myHplApp.missioncontrol.model.getConfigServicePilotScoreBreakdownUri();
var odataModelPilotScoreBreakdown = new sap.ui.model.odata.ODataModel(missionPilotScoreBreakdownUri, false);
var otblPilotScoreBreakdown = new sap.ui.table.Table({tableId: "tblPilotScoreBreakdown",
visibleRowCount: 5,
columnHeaderVisible: false,
selectionMode: "None",
editable: false,
enableColumnReordering: false
});
odataModelPilotScoreBreakdown.setCountSupported(false);
oControl = new sap.ui.commons.TextField({value: "{CA_ACHIEVEMENT_KEYFRAME_GROUP}"});
otblPilotScoreBreakdown.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text:"Keyframe Group"}),
visible: false,
template: oControl,
sortProperty: "CA_ACHIEVEMENT_KEYFRAME_GROUP",
filterProperty: "CA_ACHIEVEMENT_KEYFRAME_GROUP"
}));
oControl = new sap.ui.commons.TextField({value: "{CONDITIONID}"});
otblPilotScoreBreakdown.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text:"Condition ID"}),
visible: false,
template: oControl,
sortProperty: "CONDITIONID",
filterProperty: "CONDITIONID"
}));
oControl = new sap.ui.commons.Image({src: "{VISUALURI}",
width: "30px",
height: "30px" });
otblPilotScoreBreakdown.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text:"URI"}),
template: oControl,
width: "30px"
}));
oControl = new sap.ui.commons.TextField({value: "{NAME}"});
oControl.addStyleClass("lblPilotAchivementName");
otblPilotScoreBreakdown.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text:"Name"}),
template: oControl,
width: "50px"
}));
oControl = new sap.ui.commons.TextField({value: "{SCORE}"});
oControl.addStyleClass("lblPilotAchivementScore");
otblPilotScoreBreakdown.addColumn(new sap.ui.table.Column({label: new sap.ui.commons.Label({text:"Score"}),
template: oControl,
sortProperty: "SCORE",
filterProperty: "SCORE",
width: "50px"
}));
otblPilotScoreBreakdown.setModel(odataModelPilotScoreBreakdown);
var mdlSort = new sap.ui.model.Sorter("CA_ACHIEVEMENT_KEYFRAME_GROUP");
var pilotScoreBreakdownParams = '/InputParams(IP_MISSIONID=\'' +
myHplApp.missioncontrol.model.getActiveMissionId() +
'\',IP_VEHICLEID=\'' +
myHplApp.missioncontrol.model.getActiveVehicleId() +
'\',IP_PILOTID=\'' +
myHplApp.missioncontrol.model.getActivePilotId() +
'\')/Results';
otblPilotScoreBreakdown.bindRows(pilotScoreBreakdownParams,mdlSort);
omlMission.createRow(otblPilotScoreBreakdown);
otstrMissionControl.createTab("Mission",omlMission);
CSS test to hide the "No Data" splash
sapUiTableShNoDa.sapUiTableEmpty .sapUiTableCtrlEmpty {
display: none;
}