on 2018 May 16 7:44 AM
Hello,
I have a servlet from which I get an array of ids in Json model.
[{ID:'1234'},{ID:'5678'}....]
I need to get data from odata service based on these Ids and display in table
The url format is /processes.svc/ProcessInstance(InstanceId= '1234')
There are no collection and other methods implemented for this service. we cannot use filters as well. The only way to access data is using this single link with dynamic InstanceId.
My problem is how do I bind /ProcessInstance(InstanceId= '1234') with instanceid dynamic from the previous json data model.
This below does not work.
{code}
<Table id="idTable" mode="SingleSelectMaster" selectionChange="rowSelect" items="{/ProcessInstance}"> <columns> <Column> <Label text="ID" />
{/code}
Request clarification before answering.
I am not sure about the whole use case, but at first sight, I would suggest to merge the two service result into one JSONModel and pass that model to the view and bind accordingly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From the result of servlet({ID:'1234'},{ID:'5678'}....]) create a promise object for each oData call. Lets assume the promises as p1, p2....etc
now do something like below:
Promise.all([p1, p2, ....])
.then(function(aResults){
var oJsonModel = new sap.ui.model.JSONModel(aResults);
//bind this JSONModel to table
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.