Skip to Content
0
Dec 01, 2014 at 09:15 AM

UI5 Application is not working

39 Views

Hi,

I try to create the UI5 application with below code, as mentioned by the many web page, But it's not producing any output for me.

Here is my HTML and JS page code. I am using the Eclipse to develop the UI5 application.

**************************************************************************************************************

HTML file content

**************************************************************************************************************

<!DOCTYPE HTML>

<html>

<head>

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

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

<!-- https://openui5.hana.ondemand.com/resources/sap-ui-core.js> -->

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

id="sap-ui-bootstrap"

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

data-sap-ui-theme="sap_bluecrystal">

</script>

<!-- add sap.ui.table,sap.ui.ux3 and/or other libraries to 'data-sap-ui-libs' if required -->

<script>

sap.ui.localResources("zcode_talk");

var view = sap.ui.view({id:"idZcode_talk1", viewName:"zcode_talk.Zcode_talk", type:sap.ui.core.mvc.ViewType.JS});

view.placeAt("content");

</script>

</head>

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

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

</body>

</html>

**************************************************************************************************************

Js file content

**************************************************************************************************************

sap.ui.jsview("zcode_talk.Zcode_talk", {

/** Specifies the Controller belonging to this View.

* In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.

* @memberOf zcode_talk.Zcode_talk

*/

getControllerName : function() {

return "zcode_talk.Zcode_talk";

},

/** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.

* Since the Controller is given to this method, its event handlers can be attached right away.

* @memberOf zcode_talk.Zcode_talk

*/

createContent : function(oController) {

var oButton = new sap.ui.ux3.navigationitem({

key:"btn",

text:"Button"});

var oMusicStore = new sap.ui.ux3.navigationitem({

key:"Music",

text:"Music store"

});

var oShell = new sap.ui.ux3.Shell({

id:"Main-shell",

appTitle:"code talk sap ui5 demo",

ShowLogoutButton:false,

ShowTools:false,

worksetItems:[oButton, oMusicStore],

worksetItemSelected:[oController,worksetItemSelected,oController]

});

return oShell;

}

});

i try to run the application as web application, there is no output, getting the belong page. Can you please help me find the issue.