on 07-10-2020 11:20 AM
Hi,Expert:
I got a issue when I try to get the data of SAPUI5 ODataModel by getProperty method:
var myModel = this.getView().byId("UploadCollection").getModel();
var itemData = myModel.getProperty("/FileSet");
it dosen't work and I debug and check the oData ,it is not only "FileSet" but "FileSet(guid'f8f21e62-b7e0-1eda-b0b7-3df17b7bf6c1')" -- the guid is added at the end.
and it should be only "FileSet",like below,only "data"
and below is the table which used to create the OData service:
In the SAPUI5 demo,it uses getData() method,but it's obsoleted and be replaced by .getProperty()
.getModel().getData();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
myModel.getProperty("/FileSet(guid*************************)/YOURTARGETPROPERTY");"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
but now can't get data by "var itemData = myModel.getProperty("/FileSet");"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hong Wei,
It really is supposed to be like that, why you say it should be just FileSet?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.