on 06-01-2015 8:08 AM
Dear Experts,
I am doing the customizing and extending the standard application in the system exercise openSAP week one course. I am trying to extend the myBenefit standard apps by adding some buttons on the footer but it shows nothing in footer as i shown in my second photo. Anything wrong the button which i added as shown in the blue square box?
Very appreciated to those reply my problem encountered. Kindly suggest solution if you have. Thanks
Regards,
Loh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where is the <content>, Add like this, it will work. |
<footer id="detailFooter">
<Toolbar id="detailToolbar">
<content> | |
<ToolbarSpacer id="toolbarSpacer"> | |
</ToolbarSpacer> | |
<Button type="Accept" text="Approve" press="onApprove"></Button> | |
<Button type="Reject" text="Reject" press="onReject"></Button> | |
</content> |
</Toolbar>
</footer>
use this templete,
<mvc:View
controllerName="com.xyz.view.Detail"
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns:l="sap.ui.layout"
xmlns:f="sap.ui.layout.form">
<Page
id="detailPage"
navButtonPress="onNavBack"
title="{i18n>Title}"
showNavButton="{device>/isPhone}">
<content>
<IconTabBar
id="idIconTabBar"
expanded="{device>/isNoPhone}">
<items
id="Items">
<IconTabFilter text="{i18n>header}">
<content>
<f:SimpleForm
id="iconTabFilter1form"
minWidth="1024"
editable="false"
layout="ResponsiveGridLayout"
labelSpanL="3"
labelSpanM="3"
emptySpanL="4"
emptySpanM="4"
columnsL="1">
<f:content>
<Label
id="label1"
text="{label}">
</Label>
<Text
id="text1"
text="{text}"
maxLines="0">
</Text>
<core:ExtensionPoint
name="extIconTabFilterForm1"/>
</f:content>
</f:SimpleForm>
</content>
</IconTabFilter>
<IconTabFilter text="{i18n>Details}">
<content>
</content>
</IconTabFilter>
<core:ExtensionPoint
name="extIconTabFilter"/>
</items>
</IconTabBar>
<core:ExtensionPoint
name="extDetail"/>
</content>
<footer
id="Footer">
<Toolbar id="Toolbar">
<content>
<ToolbarSpacer
id="toolbarSpacer">
</ToolbarSpacer>
<Button type="Accept" text="Approve" press="onApprove"></Button>
<Button type="Reject" text="Reject" press="onReject"></Button>
</content>
</Toolbar>
</footer>
</Page>
</mvc:View>
Great, Nandish. May i know the coding for the controller part, is it you only refer to the EXPLORED in the SAPUI5 SDK there as the link shown in below? Or anywhere you also refer to? Because i am still wondering how to modify or add some code in the controller part. Any suggestions from you?
https://sapui5.netweaver.ondemand.com/sdk/#content/Overview.html
Thanks and appreciated.
Regards,
Loh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nandish, the screen shot as shown in below showed the controller after extended. Which line start should i added the code that you gave me? And the 2nd question is after i deleted the double slash by each line in OInit function, it showed me some errors as shown in 2nd picture and i have no idea why it will like that? Kindly suggest me any solutions and reasons if you know it. Very thanks and appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Paste below code Line 9 - 19
this.oHeaderFooterOptions = {
buttonList : [{
sId :"ADDITIONAL_BTN_BACK",
sIcon:"sap-icon://nav-back",
onBtnPressed : function(evt) {
window.history.back();
}
}]
};
_________________________________________________________________
Look for commas and semicolon give them correctly
may this example will help you,
Hi LOH CHUN WOOL,
Add below code in controller's init method()
this.getHeaderFooterOptions ={
buttonList : [{
{
sId :"ADDITIONAL_BTN_BACK",
sIcon:"sap-icon://nav-back",
onBtnPressed : function(evt) {
window.history.back();
}
}],
},
this.setHeaderFooterOptions(this.getHeaderFooterOptions);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you adding button in master page, it as to add like footer bar,
<footer
id="masterFooter">
<Toolbar
id="masterToolbar">
<content>
<footerbar:SettingsButton
id="settingsButton"
icon="sap-icon://action-settings"
tooltip="Help">
</footerbar:SettingsButton>
</content>
</Toolbar>
</footer>
in Detail you can add like a button.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Santhosh,
thanks for your reply. I am trying to add a button in footer by extending the S2 view. i have copied the code you shown but it failed to work. It will show the errors even just added one line simple code which is <Button id=button2 icon="sap-icon://save> </Button>. Do you know why it like that and how it solves this?
Thanks
Hi LOH CHUN WOOL,
In Footer directly you can't add the button bec its is child of toolbar.
refer this SAPUI5 Explored
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.