Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
rauf_shaikh
Active Participant

The Problem:


Recent upgrades in SAPUI5 library made local fiori sandbox stop working as it used to work earlier in eclipse. Whoever tried running it stuck at a point where two javascript files were failing to load, those were "sap/ushell/services/ClientSideTargetResolution.js" and "sap/ui/generic/app/navigation/service/SelectionVariant.js"

 

The Cause:


As SAPUI5/Fiori story is getting more and more interesting SAP is not recommending developers to use eclipse instead encouraging them ton use WebIDE. As a result I guess the above two mentioned to javascripts files were missing from the recent SAPUI5 library hence fiori sandbox environment failing to launch applications.

The Solution:


Follow these steps patiently..

1: appconfig: Create a dynamic web project as we used to and create a file in WebContent folder "fioriSandboxconfig.json"



 

 

 

 

 

 

 

 

 

2. fioriSandboxConfig.json: After introduction of Fiori 2.0 Fiori Launchapad has seen many exciting upgrades and hence fiori sandbox launchpad also had to get upgraded.It uses client side navigation now. In this scenario we are required modify our fioriSandboxConfig.json as follows:
//JSON Starts
{
"services": {
"LaunchPage": {
"adapter": {
"config": {
"catalogs": [
{
"id": "mysample_catalog",
"title": "Sample Application Catalog",
"tiles": [
{
"id": "MyApp",
"title": "Master Detail Application",
"size": "1x1",
"tileType": "sap.ushell.ui.tile.StaticTile",
"properties": {
"chipId": "catalogTile_001",
"title": "Default Application",
"info": "Information",
"icon": "sap-icon://Fiori2/F0001",
"targetURL": "#Action-MyApp"
}
}
]
}
],
"groups": [
{
"id": "MyApp_group",
"title": "MyApp Applications",
"isPreset": true,
"isVisible": true,
"isGroupLocked": false,
"tiles": [
{
"id": "MyApp",
"title": "Master Detail Application",
"size": "1x1",
"tileType": "sap.ushell.ui.tile.StaticTile",
"properties": {
"chipId": "catalogTile_001",
"title": "TravelRequest_SplitApp",
"info": "My Applications",
"targetURL": "#Action-MyApp"
}
}
]
}
]
}
}
},
"NavTargetResolution": {
"config": {
"enableClientSideTargetResolution": true
}
},
"ClientSideTargetResolution": {
"adapter": {
"config": {
"inbounds": {
"actionMyApp": {
"semanticObject": "Action",
"action": "MyApp",
"title": "Travel Request Sample App",
"signature": {
"parameters": {},
"additionalParameters": "allowed"
},
"resolutionResult": {
"applicationType": "SAPUI5",
"additionalInformation": "SAPUI5.Component=TravelRequest",
"url": "../../../../../../TravelRequest_SplitApp"
}
}
}
}
}
}
}
}
//JSON Ends

3. Create "ClientSideTargetResolution.js", "SelectionVariant.js" and "NavError.js" as shown in the following screenshot in your own project:



Copy and paste javascript code in the above created files from the following urls:

ClientSideTargetResolution.jshttps://sapui5.hana.ondemand.com/resources/sap/ushell/services/ClientSideTargetResolution.js

 

SelectionVariant.js: https://sapui5.hana.ondemand.com/resources/sap/ui/generic/app/navigation/service/SelectionVariant.js

NavError.js: https://sapui5.hana.ondemand.com/resources/sap/ui/generic/app/navigation/service/NavError.js

That's it!!


now you should be able to run your local fiori launchpad sandbox using following URL and see your application tile once you click the tile application should start working..
http://localhost:8080/<your project>/test-resources/sap/ushell/shells/sandbox/fioriSandbox.html



--

Regards,
Rauf Shaikh
3 Comments
Labels in this area