on 09-04-2019 3:51 AM
Currently trying to select a row from a smart table using selectionChange but the event is not firing in the contoller.
What is the correct way to use the smart table to select the row?
See below:
<core:View
xmlns:core="sap.ui.core"
xmlns="sap.m"
xmlns:smartFilterBar="sap.ui.comp.smartfilterbar"
xmlns:smartTable="sap.ui.comp.smarttable"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:smartForm="sap.ui.comp.smartform"
xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
controllerName="ECSB1.CommRateSFWA169.controller.Worklist"
height="100%">
<smartForm:SmartForm
id="smartForm"
title="{i18n>worklistTitle}">
</smartForm:SmartForm>
<smartFilterBar:SmartFilterBar
id="smartFilterBar"
entitySet="CommRateView"
persistencyKey="SmartFilter_Explored">
<smartFilterBar:controlConfiguration>
</smartFilterBar:controlConfiguration>
</smartFilterBar:SmartFilterBar>
<smartTable:SmartTable
id="ID"
entitySet="CommRateView"
smartFilterId="smartFilterBar"
tableType="ResponsiveTable"
useExportToExcel="true"
beforeExport="onBeforeExport"
useVariantManagement="true"
useTablePersonalisation="true"
header="Line Items"
showRowCount="true"
persistencyKey="SmartTableAnalytical_Explored"
enableAutoBinding="true"
demandPopin="true"
class="sapUiResponsiveContentPadding">
<Table
selectionChange="onSelectionChange"
mode="SingleSelectMaster">
</Table>
</smartTable:SmartTable>
</core:View>
sap.ui.define([
"./BaseController",
"sap/ui/model/json/JSONModel",
"../model/formatter",
"sap/ui/model/Filter",
"sap/ui/model/FilterOperator"
], function (BaseController, JSONModel, formatter, Filter, FilterOperator) {
"use strict";
return BaseController.extend("ECSB1.CommRateSFWA169.controller.Worklist", {
formatter: formatter,
onInit: function () {},
onSelectionChangeChange : function (oEvent) {
// The source is the list item that got pressed
this._showObject(oEvent.getSource());
}
});
});
Hi Thomas,
Try using rowSelectionChange instead of selectionChange event.
Regards,
Kishan Naicker
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.