我正在尝试构建一个数据网格,用户可以从中编辑、添加、删除条目,并将其作为 json 存储在 JavaScript 变量中。我让它重复使用,但维护起来需要做很多工作。当我尝试使用 dojo.store.Memory 时出现错误。这是带有 UP1 的 8.5.3,尝试使用 ext lib。
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"}); }