cancel
Showing results for 
Search instead for 
Did you mean: 

SAP UI5 View Navigation issue

lduncj14
Advisor
Advisor
0 Kudos

Hello,

New to SAP UI5 and I have created a basic application reading from a sample Northwind Odata source. I am trying to navigate between views but I am not able to get either the manifest.json file correct or the code in the controller.js file for the view. The manifest.json file is below, is this file setup correctly.

I have three views View2 is the my container, View1 is the list of the products and Detail is the detailed view of each product. I want to click on one of the products in the View1 and see the Detail view for that product.

Thanks for any insight given.

Larry

manifest.txt

Accepted Solutions (0)

Answers (1)

Answers (1)

rohit_singhal
Active Contributor

Hi Larry,

Based on the manifest.json, I can see that the project flow is: View 1 gets loaded first. Then based on an event Detail view will get triggered.

However, based on your question, you want View 2 to be loaded initially (as a container) and View 1 , Detail view to be loaded based on some event.

Probably: View 1 event would be initial load.

Detail view load would be Item press of List item.

If the above understanding is correct, then you need to follow the following steps:

1. Change rootView in sap.ui5 to View 2.

2. Remove app control from View 1 and Details View.

3. Ensure that common routing config app id and app id in View 2 is the same.

In case you still face any issues or if my understanding of your issue is not correct, then could you please elaborate your issue further.

Best Regards,

Rohit

lduncj14
Advisor
Advisor
0 Kudos

Hello Rohit,

Thank you so much, you understand exactly what I am trying to do. I have a couple of points of clarification.

When you say remove app control from View 1 and Details, do you mean remove them from the Targets in the manifest.json file?

Thanks Again

rohit_singhal
Active Contributor
0 Kudos

Hi Larry,

What I meant is that if your View 1 and Detail View have app control, then the sap.m.App control should be removed from these two views and should only be present in the View 2.

Only then will routing work as expected.

Best Regards,

Rohit