3.7K Star 11.4K Fork 4.5K

卓源软件 / JeeSite 4.2

 / 详情

列表提交怎么实现

Backlog
Opened this issue  
2021-02-14 20:31

该问题是怎么引起的?

表单提交列表属性的时候报错。目前有个办法是手动修改属性,如下,但是略麻烦些,请问下有更简便的方式吗?

list[0][id]: 1360824978603364352
list[0][name]: 6.4
list[1][id]: 1360824978683056128
list[1][name]: 3.125
改成
list[0].id: 1360824978603364352
list[0].name: 6.4
list[1].id: 1360824978683056128
list[1].name: 3.125

let list = [];
for(i=0;i<3;i++){
	list.push({id : 1, name : 'n1'});
}
js.ajaxSubmit('${ctxPath}/a/biz/xxx/update', {list:list}, function(data){
	log(data)
});

重现步骤

报错信息

org.springframework.beans.InvalidPropertyException: Invalid property 'list[0][id]' of bean class [com.jeesite.modules.biz.model.XXX]: Property referenced in indexed property path 'list[0][id]' is neither an array nor a List nor a Map; returned value was

Comments (0)

lll created任务
lll set related repository to 卓源软件/JeeSite 4.2
展开全部操作日志

Sign in to comment

状态
Assignees
Labels
Milestones
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(1)
Java
1
https://gitee.com/thinkgem/jeesite4.git
git@gitee.com:thinkgem/jeesite4.git
thinkgem
jeesite4
JeeSite 4.2

Search