ルーティングが使用されているときに私のコンテキストをsap.m.tableにバインドできません。 SplitAppでは、私はマスターページの行項目をクリックしたとき、私は今SAPUI5コンテキストでのルーティングでデータが表示されない
contextarg = decodeURIComponent(evt.getParameter("arguments").ctx);
を使用して詳細ページとコンテキストに移動し、私は
var url = "***/sap/opu/odata/SAP/ZFIRST_VENDOR_SRV";
var olineOdataModel = new sap.ui.model.odata.ODataModel(url,false);
var rd = contextarg+ "/VENDORITEMSSet";
olineOdataModel.read(rd,
null,
null,
false,
function(oData, oResponse){
var oODataJSONModel = new sap.ui.model.json.JSONModel();
oODataJSONModel.setData(oData);
// store the model
var lineTable = sap.ui.getCore().byId("__xmlview5--lineItemTable");
lineTable.setModel(oODataJSONModel,"localModel");
console.log(lineTable.getModel("localModel"));
コンソール出力を示しを使用してODATAこのPARAMに合格しています
と私は
として、テーブルと結合行っているので、<Table id="lineItemTable" headerText="Line Items" items="{'/results'}">
<columns>
<Column>
<header>
<Label text="Product ID" />
</header>
</Column>
<Column>
<header>
<Label text="Product Name" />
</header>
</Column>
<Column>
<header>
<Label text="Product Price" />
</header>
</Column>
<Column>
<header>
<Label text="Product Weight (gms)" />
</header>
</Column>
<Column>
<header>
<Label text="Available From" />
</header>
</Column>
</columns>
<ColumnListItem>
<cells>
<ObjectIdentifier title="{ProductId}" />
<ObjectIdentifier title="{ProductName}" />
<ObjectIdentifier title="{ProductPrc}" />
<ObjectIdentifier title="{ProductWt}" />
<ObjectIdentifier title="{AvailableFrom}" />
</cells>
</ColumnListItem>
</Table>
ただし、ビューにデータが表示されません。私はitems="{'results'}"
とitems="{path:'results'}"
を試しました。親切に助けてください。私はここで何をしたのですか?