我正在使用列表报告模板来实现 SAP Fiori 应用程序。桌子的类型是
sap.ui.table.Table
我添加了一个操作扩展来添加“下载”按钮,并将其
requiresSelection
值设置为 true
。但我无法获取表格选择。
我收到错误
“不支持的操作:sap.ui.table.Table#getSelectedIndices 不得 如果应用了选择插件,则被调用。”
对于以下声明:
var oTable = oEvent.getSource().getParent().getParent().getTable(); //获取智能表控件内的表 oTable.getSelectedIndices();
请帮忙。
试试这个: 为了获得上述错误的选定索引
var oTable = oEvent.getSource().getParent().getParent().getTable();
oTable.getAggregations("plugins")[0].getSelectedIndices();
尝试:
oTable._getSelectionPlugin().getSelectedIndices()