on 07-30-2016 12:10 PM
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...??
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 understandYou must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why don't you create separate views for login page and toolpage. On successfullogin you can display toolpage.
Check out the above link it may help you.
Regards,
Srinivasan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.