on 12-07-2016 9:00 AM
Hi experts,
I'm trying to remove the “save as tile” option from “My Leave request “ Fiori App.
First of all I’m trying to extend the S3 controller and I think it’s not working properly. I’m developing using eclipse Neon.
I have included at my Component.js this code:
"sap.ui.controllerExtensions": {
"hcm.myleaverequest.view.S3": {
controllerName : "sie.hrc.hcm.myleaverequest.view.S3_extension"
}
}
And I have created at my view directory of my eclipse project extension the file S3_extension.controler.js with the code:
sap.ui.controller("sie.hrc.hcm.myleaverequest.view.S3_extension", {
onInit : function() {
console.log(".....OnInit.....-S3_extension-** CONTROLLER **");
this.objHdrFtr.bSuppressBookmarkButton = true;
}
}
I cannot see at the console the text I’m trying to send at “onInit” method .
After that I guess I should override the getHeaderFooterOptions method with a code like this:
getHeaderFooterOptions: function(){
var m = new sap.ui.core.routing.HashChanger();
var u = m.getHash();
this.objHdrFtr.bSuppressBookmarkButton = true;
//if (this.extHookChangeFooterButtons) {
//o = this.extHookChangeFooterButtons(o);
//}
return o;
}
Or even the extHookChangeFooterButtons like this:
extHookChangeFooterButtons: function(o){
o.bSuppressBookmarkButton = true;
return o;
}
But since, like I’ve already said, I cannot see the text I’m trying to send to the console so I think my controller extension is not right.
Any help will be really appreciated
(Sorry if I don't select the right tags to classify my question)
Thank you for your reply Thomas,
we had a namespace problem after solve it, both "pieces of code" work fine for us.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there
We had the same requirement and the same issue, when using the extHookChangeFooterButtons method in the extended controller.
When changing "o" nothing happened - this looks like what you've tried:
extHookChangeFooterButtons: function(o){
o.bSuppressBookmarkButton = true;
return o;
}
But when we used the below it all worked fine:
extHookChangeFooterButtons: function(o){
var _o;
_o = o;
_o.bSuppressBookmarkButton = true;
return _o;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.