cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Doubt Cross Application Navigation between SAPUI5 applications

carlos_venturo
Participant
0 Kudos
1,064

Hello ,

I just followed blog https://blogs.sap.com/2016/06/20/cross-application-navigation-between-sapui5-applications/

to achieve cross application navigation between apps, but mi doubt if there is any chance to pass the parameters and not showing them in the URL.

For example the URL looks like this: ( When i pass the parameter supplierid, like in the blog )

https://flpnwc-xxxxxx.dispatcher.us2.hana.ondemand.com/sites/site1#APP1-Display?supplierID=supplier

Any chance to hide the parameters or pass it using other technique.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor

Hi Carlos Venturo,

It's better to pass the data there, I don't think it will cause any issue, if you want to validate if the user can access that participial record, you can do it in the backend when he access the data.

But if you want to hide those data just for some user requirement, you can do it in couple of ways,

1.set the model to sap.ui.core and read it in the called component.

2. This I didn't try ( I wont recommend as well because you have to manually instantiate the component ).

var oNavigationService = sap.ushell.Container.getService("CrossApplicationNavigation");
  	   	var oComponentData = {
  	   		data:// send your data here
  	   	};
  	   	oNavigationService.createComponentInstance(sIntent ,{componentData:oComponentData})
	    .done(function (oComponent) {
	    	// You will get the component
	    })
	    .fail(function (oError) {
	        jQuery.sap.log.error(oError);
	    });

Now after creating the component, inside the done function, call the toExternal function of the navigation service, you can pass the optional component and test it. check the code below:

https://ui5.sap.com/#/api/sap.ushell.services.CrossApplicationNavigation/methods/toExternal

Note: not sure the 2 point will work though as I've never tried it.

BR,
Mahesh

Answers (2)

Answers (2)

carlos_venturo
Participant

Thanks for both answers, i think the best way to go is to validate the user at the backend and showing the info according.

So even if the url is alter, it wont show any info.

Thanks again.

maheshpalavalli
Active Contributor
0 Kudos

That's Perfect

UxKjaer
Product and Topic Expert
Product and Topic Expert

Hi Carlos.

Please have a look at this similar question.

https://answers.sap.com/answers/726463/view.html

Because Javascript is client side, you can't secure the calls. You can use a Java application as middleware, but if your parameters are on the frontend, these needs to be passed.

carlos_venturo
Participant
0 Kudos

Very helpful answer.

Thanks.