|
1、新建BaaS服务,有query和save两个Action;
2、在UI设计时,新建bassData并绑定BaaS服务;
3、主页面有一个cuisineWindowDialog,绑定的src是AddCuisine.w,通过按钮打开cuisineWindowDialog,即跳转到AddCuisine.w页面;
4、在AddCuisine.w页面中输入数据后,点击保存按钮,触发windowRecerver,详见下面代码,结果页面报错为:HTTP Status 500 - 执行Action:test/Field/saveField失败,Action[test/Field/saveField]执行失败,SQL执行失败,tomcat的错误提示为:当 IDENTITY_INSERT 设置为 OFF 时,不能为表 '领域' 中的标识列插入显式值。
请问这是什么问题?谢谢。
下面为两个的js文件。
父窗口:
define(function(require) {
var $ = require("jquery");
var justep = require("$UI/system/lib/justep");
var Model = function() {
this.callParent();
this.actionUrl = "/baas/takeoutAdmin/attachment/SimpleFileStore";
};
// 点击新增按钮
Model.prototype.addCuisineClick = function(event) {
this.comp('cuisineWindowDialog').open();
};
// 编辑行信息
Model.prototype.editCuisine = function(row) {
this.comp('cuisineWindowDialog').set({
"title" : "编辑信息"
});
this.comp('cuisineWindowDialog').open({
data : row.toJson()
});
}
// 点击编辑按钮
Model.prototype.editCuisineClick = function(event) {
var row = this.comp('cuisineData').getCurrentRow();
this.editCuisine(row);
};
// 删除会员
Model.prototype.deleteClick = function(event) {
var data = this.comp("cuisineData");
var row = this.comp("cuisineData").getCurrentRow();
this.comp("cuisineData").deleteData([ row ], {
"async" : true,
"onSuccess" : function() {
data.saveData();
}
})
};
// 双击列表打开编辑框
Model.prototype.cuisineListDblclick = function(event) {
var row = this.comp('cuisineData').getCurrentRow();
this.editCuisine(row);
};
// 新增或编辑的保存
Model.prototype.cuisineWindowDialogReceived = function(event) {
alert("3");
this.comp('cuisineData').saveData();
alert("6");
this.comp('cuisineData').refreshData();
};
子窗口:
define(function(require) {
var $ = require("jquery");
var justep = require("$UI/system/lib/justep");
var Model = function() {
this.callParent();
this.actionUrl = "/baas/takeoutAdmin/attachment/SimpleFileStore";
};
// 点击新增按钮
Model.prototype.addCuisineClick = function(event) {
this.comp('cuisineWindowDialog').open();
};
// 编辑行信息
Model.prototype.editCuisine = function(row) {
this.comp('cuisineWindowDialog').set({
"title" : "编辑信息"
});
this.comp('cuisineWindowDialog').open({
data : row.toJson()
});
}
// 点击编辑按钮
Model.prototype.editCuisineClick = function(event) {
var row = this.comp('cuisineData').getCurrentRow();
this.editCuisine(row);
};
// 删除会员
Model.prototype.deleteClick = function(event) {
var data = this.comp("cuisineData");
var row = this.comp("cuisineData").getCurrentRow();
this.comp("cuisineData").deleteData([ row ], {
"async" : true,
"onSuccess" : function() {
data.saveData();
}
})
};
// 双击列表打开编辑框
Model.prototype.cuisineListDblclick = function(event) {
var row = this.comp('cuisineData').getCurrentRow();
this.editCuisine(row);
};
// 新增或编辑的保存
Model.prototype.cuisineWindowDialogReceived = function(event) {
alert("3");
this.comp('cuisineData').saveData();
alert("6");
this.comp('cuisineData').refreshData();
}; |
|