cancel
Showing results for 
Search instead for 
Did you mean: 

Use of UI UXAP library elements

Former Member
0 Kudos

Dears experts,

I'd like to embed in my view a SAP.UXAP ui element (ObjectPageLayout in my exemple) but it does not work... any thoughts?

Here is my code :


<core:View

    xmlns:core="sap.ui.core"

    xmlns:mvc="sap.ui.core.mvc"

    xmlns="sap.uxap"

    xmlns:m="sap.m"

    controllerName="mycontrollername"

    xmlns:html="http://www.w3.org/1999/xhtml"

    height="100%">

    <m:Page title="Title" class="sapUiContentPadding"

        showNavButton="false">

        <m:headerContent>

            <m:Button icon="sap-icon://print" tooltip="Imprimer" press="onPressImprimer" />

        </m:headerContent>

      

         <ObjectPageLayout id="ObjectPageLayout">

            <headerTitle>

                <ObjectPageHeader>

                    <m:Label text="Personal description"/>

                </ObjectPageHeader>

            </headerTitle>

            <m:headerContent>

                <m:Text value="some KPI info"/>

            </m:headerContent>

             </ObjectPageLayout>

      

    </m:Page>

</core:View>

Thanks a lot,

Jérémy.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos
  1. <m:Page title="Title" class="sapUiContentPadding" 
  2.         showNavButton="false">


is redundant,   ObjectPageLayout  acts as a page

Former Member
0 Kudos

Thanks Maksim,

I commented this part of the code and same result. BUT after a few tests it seams that as soon as I have any content in the headerContent part it does not work any more.

Here is my index.html file in case :


<!DOCTYPE HTML>

<html>

    <head>

        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

        <script src="resources/sap-ui-core.js"

                id="sap-ui-bootstrap"

                data-sap-ui-libs="sap.m"

                data-sap-ui-theme="sap_bluecrystal"

                data-sap-ui-libs="sap.ui.commons,sap.ui.table,sap.ui.ux3"

                data-sap-ui-xx-bindingSyntax="complex">

        </script>

        <script>

                sap.ui.localResources("zui5_fir");

                var app = new sap.m.App({initialPage:"idzui5_fir1"});

                var page = sap.ui.view({id:"idzui5_fir1", viewName:"zui5_fir.zui5_fir", type:sap.ui.core.mvc.ViewType.XML});

                app.addPage(page);

                app.placeAt("content");

        </script>

    </head>

    <body class="sapUiBody" role="application">

        <div id="content"></div>

    </body>

</html>

Former Member
0 Kudos

Ok I've learned that yes Maksim an ObjectPageLayout acts as a Page but you can still have a ObjectPageLayout nested in a Page!


Finaly I had to delete the headerContent part in the ObjectPageLayout object... but no explanation why!

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

not working could mean anything....

can u be more specific? and error message....

Former Member
0 Kudos

You're right! It means that I have an empty screen except background color and no error in console log.