on 04-05-2017 4:47 PM
Hi,
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.
Thanks,
Srini.
sObjectDate is a string,I think. can you convert to date before passing to creatkey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Akhilesh,
Regarding 1:- Date is part of key for backend oData ReadSet. because of that I am passing the date. Also I am not sure how to access the model of worklist view from detailed view.
Regarding 2:- I was not sure if ":" is the reason for issue. Anyway I will check this just to understand how date type data is effecting when it placed as part of key.
I like your first suggestion but I just don't know hoe to access model of another view.
Appreciate your help.
Thanks,
Srini.
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
.......
}
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.