Skip to Content
0
Former Member
Sep 29, 2016 at 10:22 AM

SAPUI5: Page without Shell

390 Views

I am creating a SAPUI5 project without a shell so that I can have more screen space. This is what I currently have in the index page:

<script>

sap.ui.getCore().attachInit(function() {

new sap.m.App ({

pages: [

new sap.m.Page({

id: "test",
title: "My SAPUI5 Page",
enableScrolling : true,
footer: new sap.m.Bar({

contentRight: new sap.m.Button({text: "Some text here"})

}),
content: [ new sap.ui.core.ComponentContainer({

name : "sap.demo.project"
})]

})

]

}).placeAt("content");
});
</script>


It works, and if I wanted to, I could dynamically operate on the page through JS within the app controller. However, I would prefer to specify the page data and footer event handlers as XML inside the page I am calling, as would normally do if I had used a shell and had gone down this route:


sap.ui.getCore().attachInit(function () {
new sap.m.Shell({
app: new sap.ui.core.ComponentContainer({
name: "sap.demo.project"
})
}).placeAt("content");
});


Any ideas on how I could achieve this?