There are many examples which show how to extend a Fiori Element "list" app with a custom "requires selection" button, where the behaviour of this new button is as follows:
That is fine, but what if you want adapt the controller code to access a field in the row data of the list. Does anyone know how to achieve this within an extension to a FE app for 1909?
There seems to be nothing on-line that details how to do this in VsCode !! (for a fiori element app that has been developed in VsCode, but has not yet been deployed)
Here is some example coding in 2 files that show how to extend a Fiori Elements "list" app to show static text
In controler extension
sap.ui.define([
"sap/m/MessageToast"
], function(MessageToast) {
'use strict';
return {
showData: function(oEvent) {
MessageToast.show("Hello World");
}
};
});<br>
In manifest.json
"extends": {
"extensions": {
"sap.ui.controllerExtensions": {
"sap.suite.ui.generic.template.ListReport.view.ListReport": {
"controllerName": "zdms.ext.controller.ListReportExt",
"sap.ui.generic.app": {
"Z_DMSMETA": {
"EntitySet": "Z_DMSMETA",
"Actions": {
"showData": {
"id": "showDataButton",
"text": "Show Data",
"press": "showData",
"requiresSelection": true
}
}
}
}
}
}
}
}