First Simple UI5 Application

lightFirst Simple UI5 Application

 

 


The prerequisite is – You have installed the eclipse and SAPUI5.

From the menu choose, File->New->Other..

1


Select Application Project Under SAPUI5 Application Development and select Next.

2


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.

3


A project created with Index.HTML file with a sample code.

4


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.

5


 

 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.

6


 

Run and choose “Web App Preview”.

7


The button appears on the screen.

8


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.9


App in browser.

10


 

Advertisements

One thought on “First Simple UI5 Application

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s