cancel
Showing results for 
Search instead for 
Did you mean: 

Deeplinking for sapUI5 link

former_member492955
Participant
0 Kudos
562

I deploy a weblink to cloudfoundry, in this weblink there is a flexible column layout , so when I click on any item, it will come to the below page:

**********/#/DevelopmentObject/TwoColumnsMidExpanded/410

I want to share this link to others, but it didn't nav to the item 410, it is only show the home page.

How can I edit the code to let it support the deep link for the detail item?

I change the code, but it doesn't work for the detailed item:

var urlPress = this.oRouter.oHashChanger.hash;
if (urlPress.length > 0) {this.onURLPress(urlPress);}

I create a new function onURLPress to monitor the navto action.

onURLPress: function(urlPress){
	var presslayout = urlPress.split("/").slice(0)[1],
	object = urlPress.split("/").slice(-1).pop();
	this.oRouter.navTo("DevelopmentObject", {layout: presslayout, object: object});
		},

The navTo didn't work when I input the url: **********/#/DevelopmentObject/TwoColumnsMidExpanded/410

Accepted Solutions (0)

Answers (1)

Answers (1)

FlorianVogt
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bella

I would recommend to take a look at following sources to get an expert in UI5 routing:

- Documentation: https://ui5.sap.com/#/topic/3d18f20bd2294228acb6910d8e8a5fb5

- Tutorial: https://ui5.sap.com/#/topic/1b6dcd39a6a74f528b27ddb22f15af0d