Hi Experts,
We make master-detail application from template.
Master view is ok and shown entityset properly.
But with Details view we have next problem:
We change code of template application to remove navigation table due to request one entity
_onRoutePatternMatched: function(oEvent) { if (oEvent.getParameter("name") !== "details") {return;} this._sItemPath = "/" + oEvent.getParameters().arguments.entity; this._sNavigationPath = this._sItemPath + "/" + ""; // Bind Object Header and Form using oData var oModel = new sap.ui.model.odata.ODataModel(this._sPath, true); oModel.read(this._sNavigationPath); sap.ui.getCore().setModel(oModel);
},
oModel.read generates GET request and get correct answer:
But .setModel doesn't set model properly. When view rendered we get empty fields.
Here is xml for view:
<InputListItem label="Status"> <Input placeholder="Empty" value="{SrmState}"/> </InputListItem>
We try many ways to get result (changing view.xml, adding .attachRequestCompleted etc...) but no success.