cancel
Showing results for 
Search instead for 
Did you mean: 

sapui5 routing

Former Member
0 Kudos

Hi,

I want to create a new sapui5 application.. first page is login then in second page i need to keep a toolpage onclick of side menu items ..i want to navigate to different views.. i am totally confused about structure of project.. could anyone help me? what i thought is to keep toolpage as a base page.. oninit of toolpage i will hide entire page and display login view.. after login i wil display toolpage again.. but i am not able to hide toolpage oninit.. is thr any easy way to implement tat...??

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Krishna,

You can do the above scenario in two ways.

Either calling the two views in the index.html page or by using routing concept.

As you mentioned you need easy way, i will go for first method.

Create the two view names and view type in the <script>  Tag of html as follows.(Here i am taking .js files)

1. In the login.js view create the required login UI controls and in controller call the button event method where you need to mention "app.to("id of second page")// here it is idcmb2 to navigate to second view.

2. In the second view write all the code that you need to display, but maintain the property

visible:false   //js view....visible = false    //.XML view.. for every UI control.

3. When you select the sub item call the event method of menu and get the info of selected subitem.

   In the controller make the UI control required to visible using setVisible() method.

Hope..you understand
Former Member
0 Kudos

Why don't you create separate views for login page and toolpage. On successfullogin you can display toolpage.

SAPUI5 Explored

Check out the above link it may help you.

Regards,
Srinivasan