on 01-05-2019 5:53 AM
Hi Experts,
I have Purchase requisition approval and GRC approval apps are running properly. I have to hide one button in the footer bar. I have downloaded apps but could not see those button code in the footer bar. Am I doing anything wrong?
Then how it is visible in the application. Your help will be really appreciated.
BR,
RK
Hi Ram,
Check your S3.Controller.js for the app.
You shoud have the button declared there.
var l = {
oPositiveAction: {
sI18nBtnTxt: t.resourceBundle.getText("XBUT_APPROVE"),
onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['approve'])
},
oNegativeAction: {
sI18nBtnTxt: t.resourceBundle.getText("XBUT_REJECT"),
onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['reject'])
},
// Additional Buttons // Comment if not required
buttonList: [{
sId: "btn_Forward",
sI18nBtnTxt: "XBUT_FORWARD",
onBtnPressed: jQuery.proxy(this.handleForward, t)
}],
onBack: jQuery.proxy(function () {
if (sap.ui.Device.system.phone) {
window.history.go(-1)
}
}, this)
Extend the controller and comment the code for the buttons you don't need.
Thanks,
Vaibhav Maheshwari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Ram,
In your method, extHookSetHeaderFooterOptions, add the line bSuppressBookmarkButton = true; as mentioned in code below.
var l = {
oPositiveAction: {
sI18nBtnTxt: t.resourceBundle.getText("XBUT_APPROVE"),
onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['approve'])
},
oNegativeAction: {
sI18nBtnTxt: t.resourceBundle.getText("XBUT_REJECT"),
onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['reject'])
},
bSuppressBookmarkButton = true;
onBack: jQuery.proxy(function() {
if (sap.ui.Device.system.phone) {
window.history.go(-1)
}
}, this)
};
Let me know if it helps.
Thanks,
Vaibhav
Hi Vaibhav,
I have added projects in the git hub repository. Please check in case of both the projects.
Is there way to hide button using theme designer CSS code?
https://github.com/rkmishra2703/RK-.
BR,
RK
hi Ram,
Hiding the button using CSS is not a recommended approach and might lead to inconsistencies. So i would suggest to rule that approach out.
For MM_PR_APV app, Extend your 2 controllers ( S3.controller.js and S3_Header.controller.js).
In the extension created for both the controllers, add the following code in the method extHookSetHeaderFooterOptions()
extHookSetHeaderFooterOptions: function(l) {
var t = this;
var l = {
oPositiveAction: {
sI18nBtnTxt: t.resourceBundle.getText("XBUT_APPROVE"),
onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['approve'])
},
oNegativeAction: {
sI18nBtnTxt: t.resourceBundle.getText("XBUT_REJECT"),
onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['reject'])
},
buttonList: [],
bSuppressBookmarkButton : true;
onBack: jQuery.proxy(function () {
if (sap.ui.Device.system.phone) {
window.history.go(-1)
}
}, this)
};
if (this.extHookChangeFooterButtons) {
l = this.extHookChangeFooterButtons(l)
}
this.setHeaderFooterOptions(l)
}
Please check if this works for PR Approval App. Then it should be similar to GR App.
Thanks,
Vaibhav Maheshwari
Hi Ram,
Just add the code in the button list array for FORWARD Button as shown below :
buttonList: [{
sId: "btn_Forward",
sI18nBtnTxt: "XBUT_FORWARD",
onBtnPressed: jQuery.proxy(this.handleForward, t)
}]
Your extension method code would look like this after the change .
extHookSetHeaderFooterOptions: function(l) {
var t = this;
var l = {
oPositiveAction: {
sI18nBtnTxt: t.resourceBundle.getText("XBUT_APPROVE"),
onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['approve'])
},
oNegativeAction: {
sI18nBtnTxt: t.resourceBundle.getText("XBUT_REJECT"),
onBtnPressed: jQuery.proxy(t.openApproveRejectDialog, t, ['reject'])
},
buttonList: [{
sId: "btn_Forward",
sI18nBtnTxt: "XBUT_FORWARD",
onBtnPressed: jQuery.proxy(this.handleForward, t)
}],
bSuppressBookmarkButton : true;
onBack: jQuery.proxy(function () {
if (sap.ui.Device.system.phone) {
window.history.go(-1)
}
}, this)
};
if (this.extHookChangeFooterButtons) {
l = this.extHookChangeFooterButtons(l)
}
this.setHeaderFooterOptions(l)
}
Thanks,
Vaibhav Maheshwari
hi Ram,
It would be very difficult to answer your query without looking at the source code, unless someone has encountered the same issue.
Can you share your view and controller code ?
If possible , can you upload the project to Github ?
Thanks,
Vaibhav Maheshwari
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check in the controller - most probably there will be function in the controller where footer buttons could be added.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ram mishra, without the source code it's really difficult to answer your question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Attached code screenshotss2-xml.pngs3-xml.png
Really very thankful for your reply.
please find the code in S3.Custon,Controller.js.
In another controller everything is commented out.Let me know if you need any further details.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.