1
我想構建一個用戶可以編輯,添加,刪除條目的數據網格存儲在JavaScript變量中作爲json。我把它作爲一個重複工作,但它需要很多工作來維護。當我嘗試使用dojo.store.Memory時,出現錯誤。 這是8.5.3與UP1,試圖使用ext庫。如何使用本地json數據的dojo數據網格
var Lodging = [{"CheckIn":"" ,"Check-out":"","Nights":"","Hotel":"","Rate":"","JTR":"","JTRcomments":""}];
var jtrStore = new dojo.store.Memory({data:Lodging, idProperty: "CheckIn"});
錯誤:
com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript action expression In the control : _id3 At line 2, column 31 of: #{javascript:var Lodging = [{"CheckIn":"" ,"Check-out":"","Nights":"","Hotel":"","Rate":"","JTR":"","JTRcomments":""}]; var jtrStore = new dojo.store.Memory({data:Lodging, idProperty: "CheckIn"}); }
謝謝你會嘗試 – Kalechi