マイファイルcontroller.js、配列sapui 5のjsonオブジェクトをバインドする方法?
は今、私はそれのためのコードの下にしようとしていますsapui 5を使用して配列にJSONオブジェクトをバインドします。
onInit: function() {
var elementArray=['ID','Name','Description','ReleaseDate','DiscontinuedDate','Rating','Price'];
var oModel = new sap.ui.model.json.JSONModel(elementArray);
sap.ui.getCore().setModel(oModel,'fieldArray');
// var oModel = new sap.ui.model.json.JSONModel('./smartappall/door.josn');
// sap.ui.getCore().setModel(oModel,'approcords');
},
view.js
var elementArray= bind fieldArray json model here
回答ありがとうございます。 –
あまりにも速く入力されました。返信を編集しました – Qualiture
エラーがあります:TypeError:sap.ui.getCore(...)。getModel(...)は未定義です。 –