Hi Mohan,the HTML code is the following :
<!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="/sap/ui5/1/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.commons"
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("project_dm_sapui5");
var view = sap.ui.view({id:"idSpecialButtons", viewName:"project_dm_sapui5.SpecialButtons",
type:sap.ui.core.mvc.ViewType.JS});
view.placeAt("content");
</script>
</head>
<body>
<div id="content"></div>
</body>
</html>
Instead,the javascript code view is the following :
sap.ui.jsview("project_dm_sapui5.SpecialButtons", {
/** 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 project_dm_sapui5.SpecialButtons
*/
getControllerName : function() {
return "project_dm_sapui5.SpecialButtons";
},
/** 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 project_dm_sapui5.SpecialButtons
*/
createContent : function(oController) {
var myButton = new sap.ui.commons.Button("btn");
myButton.setText(oBundle.getText("helloworld"));
myButton.attachPress(function(){$("#btn").fadeOut();});
return myButton;
}
});
Regards.
Dario.