Skip to Content
avatar image
Former Member

UI5:- Adding/passing date as parameter to routing through view binding to display Object view.


I have downloaded worklist app from sap tutorial and enhanced to pass one more field of type date to Object view. I am getting error as "Invalid URI segment '00:00',Ext='00000000552',Filename='TEST_FILE')'". attached screen shots.

Scenario:- In initial worklist, there are three columns Date, Ext and file name. When user clicks on a item, ObjectView should be displayed.

Just added one more parameter to Object view router settings in manifest.json to accept date as parameter. I could see hash of object view with new parameter of date. But in the background resource URI is coming up as '00:00',Ext='00000000552',Filename='TEST_FILE'.

When I took out the date and leave Ext and Filename then app is running with out any issues.



url.jpg (9.1 kB)
backendsap.jpg (124.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 06, 2017 at 07:24 AM

    I am not going deep into it, but how about this:

    1: why you are taking date as a key parameter?, just leave it there and get from model itself using getProperty() in the detail view.

    2: or what about replace ':' to some other character while passing thru pattern, and decode that in detail view before further use.


    Add comment
    10|10000 characters needed characters exceeded

    • first try converting to date type from string, might work, as Jun suggested.

      or, using below you can get from model instead of passing via routing pattern

      onItemPressed: function(oEvent) {
          this._oRouter.navTo("details", {
              entity: oEvent.getSource().getBindingContext().getPath().substr(1)

      and in routematched,

      _onObjectMatched: function(oEvent) {
         this._sItemPath = "/" + oEvent.getParameters().arguments.entity; // i.e. "GetNameSet(00000000552)"
      var RunidExt = this._oModel.getProperty(this._sItemPath + "/Id"); var FileName = this._oModel.getProperty(this._sItemPath + "/Name"); var Rundate = this._oModel.getProperty(this._sItemPath + "/date"); //create key here ....... }
  • Apr 06, 2017 at 04:20 PM

    sObjectDate is a string,I think. can you convert to date before passing to creatkey

    Add comment
    10|10000 characters needed characters exceeded