Skip to Content

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

To report this post you need to login first.

5 Comments

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

  1. Vladimir Pavlov

    It seems to me that your post would fit better in the SAPUI5 Developer Center which is also the home for the SAP Web IDE. If you agree, we can easily move it there.

    Also, could you please replace the screenshots with higher resolution ones as even after clicking on them they still open the same size and are hardly readable.

    Thanks,

    –Vlado (Moderator)

    (0) 
  2. Karthik S

    Hi Christoper,

    Need more information about passing parameters within url. What is the use of passing parameters with url.

    If I pass parameters within url, should I able to use it in my UI5 app which was developed using WebIDE. How could I use it in my UI5 app?

    Please suggest me.

    Thanks and regards,
    Karthik S

    (0) 
  3. Pooja Balakrishnan

    Hi Christopher,

     

    How did you acheive passing parameters to ui5 app on launching. I am having a similar requirement and unable to proceed further. Please help.

     

    Thanks and Regards

    Pooja Balakrishnan

    (0) 

Leave a Reply