First Simple UI5 Application
The prerequisite is – You have installed the eclipse and SAPUI5.
From the menu choose, File->New->Other..
Select Application Project Under SAPUI5 Application Development and select Next.
Provide a Project name and in library section Choose sap.ui.commons and un-check the check box for Create an Initial View and choose Finish.
A project created with Index.HTML file with a sample code.
The demo is to create a simple BUTTON on the HTML BODY. This can be done in simple 3 steps as highlighted with comments for each step.
Inside script start and end tag put below code:
// Instantiate a new button
oBtn = new sap.ui.commons.Button(“btn1”);
// set button text with object
oBtn.setText(“I am a Button”);
// add button to the body
oBtn.placeAt(“content”);
Then save the file.
Run and choose “Web App Preview”.
The button appears on the screen.
If u want to see it in web browser, then choose the highlighted button or simply copy the URL from ecplise and paste it in browser.
App in browser.
Very well written story. It will be supportive to anyone who usess it, including me. Keep doing what you are doing – can’r wait to read more posts.
LikeLike