cancel
Showing results for 
Search instead for 
Did you mean: 

Can I have a direct link to an xml view within an SAPUI5 app (hosted on HCP)?

danreg
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi folks,

I'd like to know the following: Suppose there is an SAPUI5 app hosted on HCP - with a URL like that "app.dispatcher.hana.ondemand.com".

This app has quite some views/controllers in the view folder. The question is if there is a way to provide links to an xml view ("Example.view.xml") directly.

I.e.

app.dispatcher.hana.ondemand.com --> what to add to this URL to call Example.view.xml directly?

(app.dispatcher.hana.ondemand.com/index.html would work, so I assume)

I already have this info but need further advise "It seems possible, but one needs to build the mechanism using the sap.ui.core.routing.Router, and use a hash in the address to load the right view on startup." Hope someone can elaborate and support on this.

Thanks and regards Daniel

Accepted Solutions (1)

Accepted Solutions (1)

scott_stefanich
Active Participant
0 Kudos

Hello Daniel,

I highly recommend the Application Best Practices Building section of the SAPUI5 documentation's Developer Guide, especially Step 3: Navigation and Routing.

The documentation also has demo apps such as the app used in the Application Best Practices. If you open the app, the URL is as follows:

".../tdg/index.html?responderOn=true"

Selecting product "Fruit Punch" has the URL:

".../tdg/index.html?responderOn=true#/product/4/supplier"

Navigating directly to this URL binds product 4 (Fruit Punch) to the Detail view and sets the selected tab (Supplier).

Regards,

Scott

Answers (0)