Skip to Content

Launching UI5 apps with additional URL parameters in WebIDE

I recently came across the issue of testing a UI5 app in the WebIDE that required URL parameters on launch and although this could be achieved easily on a local server setup, when deployed onto HCP the WebIDE seemed to provide few options for testing.

The WebIDE provides a nice size adjustable Frame layout to test code changed however the URL provided is run from a HCP server and so contains non standard URL parameters.

/wp-content/uploads/2015/08/scn1_765116.jpg

On a recent project I was required to launch my app with URL parameters after the index.html with a hash followed by multiple parameters.

e.g. https://account.hanaondemand.com/myapp/index.html/#/urlparam1/one/urlparam2/two

This can be particularly useful when running apps within environments that pass information into your UI5 app on launch, e.g. custom C4C apps. Or even to test routing mechanisms within HCP without having to commit your untested code to HCP with a version number or push it to HCP with a git tag for versioning.

As it happens, looking closer at the WebIDE settings you can customise how it runs web applications for testing purposes.

Under Run » Run Configurations » New Run Configuration you can specify how you would like to run your app.

/wp-content/uploads/2015/08/scn2_765117.jpg

Here you can specify settings such as which version of the SAPUI5 SDK you would like to load. You can even provide standard URL parameters which are in turn translated into ASCII characters as standard in your web browser.


Un-ticking the ‘Open with frame’ tick box will force WebIDE to load your app in full screen mode when the /wp-content/uploads/2015/08/3_764370.jpg button is pressed, you may have to select the ‘Run’ menu and click on your test configuration.


/wp-content/uploads/2015/08/4_764371.jpg/wp-content/uploads/2015/08/scn3_765120.jpg

Now that your app has opened you can manipulate the browsers URL and test your code without having to deploy to HCP.

/wp-content/uploads/2015/08/scn4_765119.jpg

5 Comments
You must be Logged on to comment or reply to a post.