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

lihu2651 2009-04-09 03:08:08
使用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});
});
.....
.....
.....


在线等,急呀,谢谢
...全文
423 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lemonran 2011-07-27
  • 打赏
  • 举报
回复
唉,悲剧,我现在也遇到了类似的问题
zhangqiang1003 2010-06-12
  • 打赏
  • 举报
回复
同样的问题
lihu2651 2009-04-09
  • 打赏
  • 举报
回复
........................................
lihu2651 2009-04-09
  • 打赏
  • 举报
回复
回帖是一种美德!每天回帖即可获得 10 分可用分

81,077

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧