Friday 15 June 2012

sapui5 - Page content not displayed -



sapui5 - Page content not displayed -

i trying create simple sapui5 page has text in content. header , footer displayed , not content. not able understand why. when seek emulate phone in google chrome buttons in footer not displayed.

code(index.html):

<!doctype html> <html> <head> <script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.m"></script> <meta http-equiv="x-ua-compatible" content="ie=edge" /> <meta charset="utf-8"> <title></title> </head> <!-- define xmlview - done in separate file --> <script id="view1" type="sapui5/xmlview"> <mvc:view height="100%" xmlns:mvc="sap.ui.core.mvc" controllername="my.controller" xmlns="sap.m"> <page title="centered title" class="marginboxcontent" shownavbutton="true" > <headercontent> <button icon="sap-icon://action" /> </headercontent> <subheader> <toolbar> <searchfield /> </toolbar> </subheader> <content> <vbox> <text text="lorem ipsum dolor st amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. @ vero eos et accusam et justo duo dolores et ea rebum. stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit down amet. lorem ipsum dolor sit down amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. lorem ipsum dolor sit down amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat" /> </vbox> </content> <footer> <toolbar> <toolbarspacer/> <button text="accept" type="accept" /> <button text="reject" type="reject" /> <button text="edit" /> <button text="delete" /> </toolbar> </footer> </page> </mvc:view> </script> <script> sap.ui.controller("my.controller", { oninit : function(){ } }); var myview = sap.ui.xmlview("myview", {viewcontent:jquery('#view1').html()}); // myview.placeat('content'); </script> </head> <body class='sapuibody'> <div id='content'></div> </body> </html>

please help. thanks

if wrap sap.m.page command in sap.m.app command should give want.

<mvc:view xmlns:mvc="sap.ui.core.mvc" controllername="my.controller" xmlns="sap.m"> <app> <page title="centered title" class="marginboxcontent" shownavbutton="true"> ... </page> </app> </mvc:view>

you don't need height="100%" attribute.

sapui5

No comments:

Post a Comment