Sapui5 自动刷新表行
我在SAPUI5中创建了一个表,并使用Sapui5 自动刷新表行,sapui5,Sapui5,我在SAPUI5中创建了一个表,并使用oTable.addItem(oRows)将行添加到此表中。它工作得很好。但当我滚动或单击屏幕上的某个位置时,刷新图标(处理循环)会自动出现在表行中 代码: 函数addData(results,oTable,add){//这里results表中有我的数据,它被添加到表中 对于(var i=0;i
oTable.addItem(oRows)
将行添加到此表中。它工作得很好。但当我滚动或单击屏幕上的某个位置时,刷新图标(处理循环)会自动出现在表行中
代码:
函数addData(results,oTable,add){//这里results表中有我的数据,它被添加到表中
对于(var i=0;i
我不知道为什么会出现刷新图标。以前有人面临过这个问题吗 您是否设置了任何挫折方法?单击时是否正在加载任何数据?如果不显示代码,就不可能知道发生了什么。我没有对这个表使用任何setBusy()。没有加载任何数据。只有刷新(循环加载)图标会重复显示,就好像它正在更新表格一样。但是没有数据要更新。伙计们,谢谢你们的帮助。我解决了。我在创建表时使用了属性growingscrolltoad=“true”。因此,当我向下滚动时,这个刷新正在发生。所以,毕竟有数据正在更新。。。
function addData(results, oTable, add) { //Here results table has my data which is added to table
for ( var i = 0; i < results.length; i++) {
var oEntry = {};
oEntry.SAP__Origin = results[i].SAP__Origin;
oEntry.Sbname = results[i].Sbname;
oEntry.Fname = results[i].Fname;
oEntry.Lname = results[i].Lname;
oEntry.Stdate = results[i].Stdate;
oEntry.Sttime = results[i].Sttime;
oEntry.Endate = results[i].Endate;
oEntry.Entime = results[i].Entime;
oEntry.Status = results[i].Status;
oEntry.Tzone = results[i].Tzone;
var oTemplate = new sap.m.ColumnListItem(
{
cells : [
new sap.m.Text({
text : oEntry.SAP__Origin
}),
new sap.m.Text({
text : oEntry.Sbname
}),
new sap.m.Text({
text : oEntry.Fname
}),
new sap.m.Text({
text : oEntry.Lname
}),
new sap.m.Text({
text : z_cof_subs.util.Formatter
.date1(oEntry.Stdate)
}),
new sap.m.Text({
text : z_cof_subs.util.Formatter.time(
oEntry.Sttime, oEntry.Tzone)
}),
new sap.m.Text({
text : z_cof_subs.util.Formatter
.date1(oEntry.Endate)
}),
new sap.m.Text({
text : z_cof_subs.util.Formatter.time(
oEntry.Entime, oEntry.Tzone)
}),
new sap.m.Switch(
{
state : z_cof_subs.util.Formatter
.check(oEntry.Status),
}) ]
}
);
if (add == 'X') {
oTable.addItem(oTemplate);
}
}
};