Hi,
I am trying to define a route for a hash which contains a number of fixed parts and a number of variable parts ... kinda like
/search/datefrom/dateto/idocnumber/
/search/datefrom/dateto/partner/idocnumber/
etc ...
I am having issues in getting the values passed in my routemacthhandler when I am using the 'navTo' method...
I defined the following pattern:
pattern : "search/{datefrom}/{dateto}/:details*:"
(1) If I type in the url '/search/04-12-14%2010:13/04-12-14%2011:13/test1/test2/test3' manually in the browser and execute:
The route matches and I am getting the following argument object passed along in the event - the 'details*' is correctly filled in:
oEvent.getParameter("arguments") :
datefrom: "04-12-14 10:53" dateto: "04-12-14 11:53" details*: "test1/test2/test3"
(2) If I do the same via coding using the 'navTo' method - 'details*' is always undefined ... no matter what I try in terms of values, etc ...
oEvent.getParameter("arguments"):
datefrom: "04-12-14 10:53" dateto: "04-12-14 11:53" details*: undefined
Here is the code:
searchParameters.datefrom = this.byId("sDateTimeFrom").getValue(); searchParameters.dateto = this.byId("sDateTimeTo").getValue(); /* adding all as one concatenated string does not work */ searchParameters.details = "test1/test2/test3"; /* adding all as additional properties does not work */ searchParameters.details = "test1"; searchParameters.details2 = "test2"; searchParameters.details3 = "test3"; // Navigate sap.ui.core.UIComponent.getRouterFor(this).navTo("search",searchParameters, true );
Anyone any idea on how to tackle this ?
Kind Regards,
Steven