Идея состоит в том, чтобы включить кнопку при выборе строки. Но когда я выбираю любую строку, кнопка не активируется.
Найдите прикрепленный фрагмент кода и снимок экрана [error_1]
onInit: function () {
var oViewModel,
iOriginalBusyDelay,
oTable = this.byId("table");
// Put down worklist table's original value for busy indicator delay,
// so it can be restored later on. Busy handling on the table is
// taken care of by the table itself.
iOriginalBusyDelay = oTable.getBusyIndicatorDelay();
// keeps the search state
this._aTableSearchState = [];
this.oSemanticPage = this.byId("page");
this.oEditAction = this.byId("editAction");
oTable.attachSelectionChange(this.onTableSelection, this);
},
/* =========================================================== */
/* event handlers */
/* =========================================================== */
onTableSelection: function () {
var oTable = this.getView().byId("table");
var aSelectedItems = oTable.getSelectedItems();
if (aSelectedItems.length > 0) {
this.byId("test").setEnabled(true);
}