jsonモデルバインディングでスマートテーブルを使用してSAPUI5アプリケーションを開発しようとしています。 While running this program I'm getting error I'm sharing that snapshot with you 私は自分のコードを共有しています、ビューではこのSmartTableとJSONModelバインディングを使用したアプリケーション
を達成するためにどのように私を提案してください:コントローラで
<smartTable:SmartTable
id="smartTable_ResponsiveTable"
smartFilterId="smartFilterBar"
tableType="ResponsiveTable"
editable="false"
entitySet="tableSet"
useVariantManagement="false"
useTablePersonalisation="false"
header="Products"
showRowCount="true"
useExportToExcel="false"
enableAutoBinding="true"
initiallyVisibleFields="name">
</smartTable:SmartTable>
を:
var array = [{
"name" : "Dinesh",
"id" : "123"
},
{
"name" : "Nikhil",
"id" : "456"
},{
"name" : "Pulkit",
"id" : "789"
}];
var model = new sap.ui.model.json.JSONModel();
model.setData({
tableSet: array
});
this.getView().byId("smartTable_ResponsiveTable").setModel(model);
});
これを行う方法を私に勧めてください。
こんにちはガブリエルは、回答を与えていただきありがとうございます。私は以下のように私のコードに列タグを追加 \t \t \t \t \t smartTable:列>これを追加した後、私は次のエラーを取得していますが「SAP/UI /コンプ/ smarttable /列のロードに失敗しました。 js 'https://sapui5.netweaver.ondemand.com/resources/sap/ui/comp/smarttable/columns.js:404 - エラー。何が問題なのか、その中に列を追加する方法を述べてください(サンプルコードを提供してください)よろしく、Dinesh –
Dinesh
exploredの例ではxmlビューの列が定義されていないので、 。唯一のアドバイスは、調査の例に従うことです: –
https://sapui5.netweaver.ondemand.com/explored.html#/entity/sap.ui.comp.smarttable.SmartTable/samples –