dwr参数对像有Map属性出错的问题,急

lihu2651 lihu2651 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
使用dwr调用服务器端函数,函数参数是一个自定义对像,而这个对像有个属性是Map<String, MyJavaBean>,这个属性又是通过Hibernate一对多配置的,现在在客户端执行这个函数报错:Error marshalling lzj.whms.dao.entity.InStorehouse: !MapConverter.FormatError![{]!. See the logs for more details.

客户端代码:
.....
.....
.....
var dataStore = ISHMF.detailGrid.getStore();

var inSh = {};
var inDetail = []; Map<String, InDetail>
for(var i=0; i<dataStore.getCount(); i++){
var data = dataStore.getAt(i).data;
var key = "key_" + i;
var detail = {key : {
inDetailNum: data.id,
materialName: data.materialName,
materialSpecs: data.materialSpecs,
materialNature: data.materialNature,
materialProArea: data.materialProArea,
storehousePlace: {shpNum:data.shpNum},
inOughtAmount: data.InOughtAmount,
inOughtWeight: data.InOughtWeight,
inFactAmount: data.InFactAmount,
inFactWeight: data.InFactWeight,
remark: remark,
inStorehouse: {inNum:inNum}
}};
inDetail.push(detail);
}

//传入的对像
inSh.inNum = inNum;
inSh.shipper = selShipper;
inSh.webUser = curUser;
inSh.storehouse = selStorehouse;
inSh.origBill = origBill;
inSh.transMode = transMode;
inSh.transCom = transCom;
inSh.transBoatId = transBoatId;
inSh.inTime = inTime;
inSh.sort = "入库";
inSh.osState = 0;
inSh.remark = remark;
inSh.inDetail = inDetail; //Map<String, InDetail>

dwrService.addInStorehouse(inSh, function(result){
Ext.Msg.show({title:'提示', msg: "数据保存成功", buttons: Ext.Msg.OK, icon: Ext.MessageBox.INFO});
});
.....
.....
.....


在线等,急呀,谢谢
...全文
评论 4
收藏 已收藏
分享
返回顶部
lihu2651
Web 开发 81,108 成员 341,721 内容