Maksim,
Thanks so much for your reply. I think I am still having difficulty with the binding. Before I saw your reply I had the realization that if I rebind in the bindView function that should call the oData service again and it does. And in debugging the oData service I see there are results coming back, but they don't show up on the UI.
When I first implemented a named oData service and a second named oData service, I adjusted the bindView method as follows:
var oView = this.getView();
var oEeModel = oView.getModel("oModelEe");
var eeServiceUrl = "/EmployeeDataSet('" + eePernr + "')";
oView.bindElement({ path: eeServiceUrl, model: "oModelEe" })
Making this change, I could then use data from the oModelEe in the view by referencing in the xml as follows:
<ObjectAttribute id="EEName" text="{oModelEe>Ename}" title="EEName"/> <ObjectAttribute id="OrgUnit" text="{oModelEe>OrgunitTxt}" title="Org Unit"/>
Now that I am trying to get to the other entity set, I adjusted the binding method as follows:
| | var oView = this.getView(); |
| | var eePernr = oView.getModel("mainModel").getData(sEntityPath).EMP_PERNR; |
| | var oEeModel = oView.getModel("oModelEe"); |
| | var eeServiceUrl = "/EmployeeDataSet('" + eePernr + "')"; |
| | oView.bindElement({ path: eeServiceUrl, model: "oModelEe" }); |
| | var eeServiceUrlQual = eeServiceUrl + "/QualificationSet"; |
| | oView.byId("qualificationSetList").bindElement({ path: eeServiceUrlQual, model: "oModelEe" }); |
And when I execute the last line, it does call the appropriate oData service which is returning data but again nothing in the UI. When I look at those elements through the SAPUI5 Debugging tools (Ctrl+Alt+Shift+S) I can see there is no binding there. I have not adjusted the view from what I had posted previously.