on 2016 Dec 01 5:00 PM
Hello Guys,
I am currently trying to code a page using ObjectPage. In this page I am trying to bind a model to the ObjectPage to show custom data on it.
Everything works well as long as I dont use a model for the ObjectPageHeader itself.
If I do so, this strange error appears:
This works:
<mvc:View
xmlns:mvc = "sap.ui.core.mvc"
xmlns:core="sap.ui.core"
xmlns="sap.uxap"
xmlns:layout="sap.ui.layout"
xmlns:m="sap.m"
height = "100%"
controllerName = "de.ibsolution.sapidm.ui5.controller.ViewPerson">
<ObjectPageLayout
showTitleInHeaderContent="true"
>
<headerTitle>
<ObjectPageHeader
id="testHeader"
objectImageURI="img/test.jpg"
objectTitle="Test"
objectImageShape="Circle"
objectImageAlt="TestUser"
objectSubtitle="ID"
isObjectIconAlwaysVisible="false"
isObjectTitleAlwaysVisible="false"
isObjectSubtitleAlwaysVisible="false">
</ObjectPageHeader>
</headerTitle>
<headerContent>
<layout:VerticalLayout>
<m:Link text="{SV_MX_PHONE_PRIMARY}"/>
<m:Link text="{SV_MX_MAIL_PRIMARY}"/>
</layout:VerticalLayout>
<layout:HorizontalLayout>
<m:Image src="img/linkedin.png"></m:Image>
<m:Image src="img/Twitter.png"></m:Image>
</layout:HorizontalLayout>
<layout:VerticalLayout>
<m:Label text="Employed"/>
<m:Label text="Testuser"/>
<m:Label text="01.10.2016 - 01.10.2099"/>
</layout:VerticalLayout>
<layout:VerticalLayout>
</layout:VerticalLayout>
</headerContent>
<sections>
</sections>
</ObjectPageLayout>
</mvc:View>
This does not:
<ObjectPageHeader
id="testHeader"
objectImageURI="img/test.jpg"
objectTitle="{SV_DISPLAYNAME}"
objectImageShape="Circle"
objectImageAlt="{SV_DISPLAYNAME}"
objectSubtitle="{ID}"
isObjectIconAlwaysVisible="false"
isObjectTitleAlwaysVisible="false"
isObjectSubtitleAlwaysVisible="false">
</ObjectPageHeader>
What am I doing wrong?
//Controller Code:
onInit: function (oEvent) {
var oModel = new JSONModel(this._loadUsersData(this));
this.getView().setModel(oModel);
this.currentController = this;
},
Hello Jun Wu,
the binding is ok. Like you see, in the headerContent it does work:
<layout:VerticalLayout>
<m:Link text="{SV_MX_PHONE_PRIMARY}"/>
<m:Link text="{SV_MX_MAIL_PRIMARY}"/>
</layout:VerticalLayout>
Only using it in the Header itself triggers this error!
Regards, Aydin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can u use full path like {/SV_DISPLAYNAME} for all your binding
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
10 | |
10 | |
7 | |
7 | |
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.