$(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

Not able to Bind OData in VBOX in SAPUI5

IN the Manifest.json I had created OData model

<m:Tableid="idProductsTable"items="{path : 'invoice2>/UserDetails'}"

mode="SingleSelectLeft">

<m:columns>

<m:Column>

<m:Texttext="Company"/>

</m:Column>

</m:columns>

<m:items>

<m:ColumnListItem>

<m:cells>

<m:Texttext="{invoice2>Company}"/>

</m:cells>

</m:ColumnListItem>

</m:items>

</m:Table>

By the above code I am able to bind the data and the output is coming. But the issue is

that when I use the VBOX in the GRID control and output is not coming

.

<layout:Gridbinding="{invoice2>/UserDetails}">

<layout:content>

<m:VBox>

<m:Texttext="{invoice2>Company}"/>

</m:VBox>

</layout:content>

</layout:Grid>

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    but if i had used below code and i am not able to display and the out put is not displaying.And i am not seeing any error but output is not displaying

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

    <ObjectPageLayout id="ObjectPageLayout" enableLazyLoading="true" upperCaseAnchorBar="false" showHeaderContent="true" subSectionLayout="TitleOnTop">

    <headerContent>

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

    <layout:content>

    <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:content>

    </layout:Grid>

    </headerContent>

    </ObjectPageLayout>

    </m:Page>

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 27, 2017 at 12:04 PM

    Hi Durga ,

    The property you are mentioning in Grid is wrong its not 'binding' its 'content' :

    <layout:Grid content ="{invoice2>/UserDetails}">

    <layout:content>

    <m:VBox>

    <m:Texttext="{invoice2>Company}"/>

    </m:VBox>

    </layout:content>

    </layout:Grid>

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Viplove,

      If i am using the "content" , output is not coming if it is hardcode value under the ObjectPageLayout and also the even ObjectPageLayout is not displaying in the output

      If i had not use the "content" then the Harcode value is displaying along with the ObjectPageLayout is displaying in the output along with harcode values.

      Could you please let me know i can use "content" i.e content="{invoice2>/UserDetails}" under the ObjectPageLayout , Is there any other property i can use it.

      Becuase the property "content" is not working under the ObjectPageLayout.

      Please help me on this.