$(function () { pageContext.i18n.modTalk = 'moderation talk'; pageContext.i18n.replyToComment = 'Reply'; pageContext.i18n.modTalkEmpty = 'moderation talk is empty'; pageContext.url.getModTalk = "/comments/%25ID%25/listModTalk.json"; pageContext.url.possibleCommentRecipients = "/comments/%ID%/possibleRecipients.json"; pageContext.url.commentEdit = '/comments/%25ID%25/edit.html'; pageContext.url.commentView = '/comments/%ID%/view.html'; pageContext.i18n.commentVisibility = { 'full': 'Viewable by all users', 'op': 'Viewable by the original poster', 'mod': 'Viewable by moderators', 'opAndMod': 'Viewable by moderators and the original poster', 'other': 'Advanced visibility', 'dialogTitle': 'Comment visibility', 'selectGroups': 'Visible to groups', 'selectOther': 'Other recipients', 'selectOriginalPoster': 'Original poster', 'selectModerators': 'Moderators', 'selectAssignees': 'Asked to answer users' }; pageContext.i18n.commentMenuLabels = { 'comment-edit': 'comments.menu.edit', 'comment-delete': 'comments.menu.delete', 'comment-convert': 'comments.menu.convert' };pageContext.i18n.answer= { bestAnswer: 'Best Answer', controlBar : { accept: 'Accept', unaccept: 'Unaccept', acceptCommand: 'Accept this answer as correct', cancelAcceptedCommand: 'Remove this answers accepted status' } }; window.croles = { u: false, op: false, m: false, og: false, as: false, ag: false, dc: false, doc: false, eo: false, ea: false }; tools.init({ q: { e: false, ew: false, eo: false, r: false, ro: false, d: false, dow: false, fv: false, c: false, co: false, p: false, tm: false , ms: false, mos: false }, n: { f: false, vf: false, vfo: false, vr: false, vro: false, c: false, co: false, vu: false, vd: false, w: false, wo: false, l: false }, c: { e: false, eo: false, d: false, dow: false, ta: false, tao: false, l: false }, a: { e: false, ew: false, eo: false, d: false, dow: false, a: false, aoq: false, ao: false, tc: false, tco: false, p: false, tm: false }, pc: croles }, { tc: true, nsc: true }); commandUtils.initializeLabels(); }); Skip to Content
avatar image
Former Member

ObjectPageLayout

Hi,

When i had used the below code output is displaying with out using the ObjectPageLayout Control.

please see the below code ,I had used content="{invoice2>/UserDetails}" to bind the OData .

<m:Page id="idPage" enableScrolling="true" title="{i18n>userProfileApp}" showNavButton="false" navButtonPress="navButtonPress" >

<layout:Grid defaultIndent="L0 M0 S0" defaultSpan="L6 M6 S6" position="Left" width="100%" containerQuery="false" hSpacing="0" vSpacing="0">

<layout:Grid content="{invoice2>/UserDetails}" id="headerContentUserProfile" defaultIndent="L0 M0 S0" defaultSpan="L12 M12 S12" position="Left" width="100%" containerQuery="false" hSpacing="0" vSpacing="0">

<layout:content>

<m:HBox>

<m:Text text="{i18n>company}:" width="7rem" maxLines="1" wrapping="false" textAlign="Begin" textDirection="Inherit" />

<m:Text text="{invoice2>Company}" width="auto" maxLines="1" wrapping="false" textAlign="Begin" textDirection="Inherit" />

</m:HBox>

</layout:content>

</layout:Grid>

</layout:Grid>

Now I am using the ObjectPageLayout ,please see the below code related to that now the output is not displaying and i am not seeing any error.Could any one help on this

<m:Page id="idPage" enableScrolling="true" title="{i18n>userProfileApp}" showNavButton="false" navButtonPress="navButtonPress" >

<ObjectPageLayout>

<headerContent>

<layout:Grid defaultIndent="L0 M0 S0" defaultSpan="L6 M6 S6" position="Left" width="100%" containerQuery="false" hSpacing="0" vSpacing="0">

<layout:Grid content="{invoice2>/UserDetails}" id="headerContentUserProfile" defaultIndent="L0 M0 S0" defaultSpan="L12 M12 S12" position="Left" width="100%" containerQuery="false" hSpacing="0" vSpacing="0">

<layout:content>

<m:HBox>

<m:Text text="{i18n>company}:" width="7rem" maxLines="1" wrapping="false" textAlign="Begin" textDirection="Inherit" />

<m:Text text="{invoice2>Company}" width="auto" maxLines="1" wrapping="false" textAlign="Begin" textDirection="Inherit" />

</m:HBox>

</layout:content>

</layout:Grid>

</layout:Grid>

</headerContent>

</ObjectPageLayout>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 31, 2017 at 11:40 AM

    Hi Durga ,

    Can you just try binding element to the object page layout ... like bindElement("invoice2>/")

    thanks

    Viplove

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 01, 2017 at 12:23 PM

    Hi Viplove,

    I am Sorry i am in office and i cannot share the link.

    And now i am trying Vertical layout also in the ObjectPagelayout still i am not able to bind it.

    Please find the View Code

    UserProfileList.view.xml

    http://www.w3.org/1999/xhtml" xmlns="sap.uxap" xmlns:layout="sap.ui.layout" xmlns:m="sap.m" xmlns:form="sap.ui.layout.form" height="100%">

    <ObjectPageLayout id="ObjectPageLayout" enableLazyLoading="false" showTitleInHeaderContent="true" showEditHeaderButton="true" editHeaderButtonPress="handleEditBtnPress" >

    <headerTitle>

    <ObjectPageHeader objectImageURI="./localService/assets/default.png" objectTitle="{invoice2>Fullname}" objectImageShape="Circle" objectImageAlt="Denise Smith" objectSubtitle="Senior UI Developer" isObjectIconAlwaysVisible="false" isObjectTitleAlwaysVisible="false" isObjectSubtitleAlwaysVisible="false">

    </ObjectPageHeader>

    </headerTitle>

    <headerContent>

    <layout:VerticalLayout>

    <m:Link text="{invoice2>Fullname}"/>

    </layout:VerticalLayout>

    </headerContent>

    </ObjectPageLayout>

    </mvc:View>

    Please find the Controller code

    UserProfileList.controller.js

    sap.ui.define([ "sap/ui/core/mvc/Controller" ],

    function(Controller)

    {

    "use strict";

    return Controller.extend("usrprofile.app.controller.UserProfileList",

    {

    onInit: function() {

    this.getView().setModel(this.getView().getModel("invoice2"));

    this.getView().byId("ObjectPageLayout").bindElement("invoice2>/UserDetails");

    }

    });

    });

    Add comment
    10|10000 characters needed characters exceeded