Property referenced in indexed property path is neither an array nor a List nor a Map

摘要:
在参数传输请求中记录错误。beaanclass[com.api6.platform.product.mailyoffice.car.entity.ApprovalForCar]的属性'distributeCars[0][ackStatus]无效:Propertyreferencedindexedpropertypath'distributeCoars[0][aackStatus

记一次传参请求报错,没有解决

Invalid property 'distributeCars[0][ackStatus]' of bean class [com.api6.plate.prototype.dailyoffice.car.entity.ApprovalForCar]: Property referenced in indexed property path 'distributeCars[0][ackStatus]' is neither an array nor a List nor a Map; returned value was [com.api6.plate.prototype.dailyoffice.car.entity.DistributeCar@11;id=null]

Property referenced in indexed property path is neither an array nor a List nor a Map第1张

$.ajax({
url: "${pageContext.request.contextPath}/app/carmange/saveSupplemental",
data: $form.serialize()+'&'+JSON.stringify($.param(data)),//获得表单数据
dataType:'json',
success: function(m){

 复杂传值list 如果是distributeCars[0].ackStatus,就可以。

JavaScript模拟表单(带数组的复杂数据结构)提交
function test(){
    var typeArray = new Array();
    typeArray.push("mm");
    typeArray.push("gg");
    
    var demoarry = new  Array();
    demoarry.push("dd");
    demoarry.push("qq");
    
    typeArray.push(demoarry);
    
    console.log(typeArray);
    
    var id = 0;
    var data = {
        id:  id ,
        type: typeArray,
        demoarry : demoarry
    };
    httpPostUrlExt("http://www.baidu.com",data);
}

function httpPostUrlExt(url, data) {
    var temp = document.createElement("form");
    temp.action = url;
    temp.method = "post";
    temp.style.display = "none";
    for (var x in data) {
        if(Object.prototype.toString.call(data[x]) === '[object Array]' ) {
            var arr = data[x];
            while(arr.length){
                var opt = document.createElement("textarea");
                opt.name = x;
                opt.value = arr.pop();
                temp.appendChild(opt);
            }
        } else {
            var opt = document.createElement("textarea");
            opt.name = x;
            opt.value = data[x];
            temp.appendChild(opt);
        }
    }
    document.body.appendChild(temp);
    console.log(temp);
    //temp.submit();
    return temp;
}

免责声明:文章转载自《Property referenced in indexed property path is neither an array nor a List nor a Map》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇个人作业——华为软件开发云案例分析DevExpress WPF界面控件下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

ssh 文件传输

在linux下一般用scp这个命令来通过ssh传输文件。 1、从服务器上下载文件scp username@servername:/path/filename/var/www/local_dir(本地目录) 例如scp root@192.168.0.101:/var/www/test.txt 把192.168.0.101上的/var/www/test.txt...

Haproxy 开启日志记录

安装部署完Haproxy之后,默认是没有开启日志记录的,需要相应的手工配置使其日志功能开启。 【创建日志记录文件夹】 mkdir /var/log/haproxychmod a+x /var/log/haproxy 【开启rsyslog记录haproxy日志功能】 vim /etc/rsyslog.conf 修改: # Provides U...

批量重命名文件

linux批量修改文件名 1、删除所有的 .bak 后缀: rename 's/.bak$//' *.bak 注意,这个命令的格式组织如下:s/ .bark$ / / 是s/para1/para2/ 这个有点想sed的语法,将para1匹配的字符串换成para2 2、把 .jpe 文件后缀修改为 .jpg: rename 's/.jpe$/.jpg/' *...

百度地图绘制行驶轨迹、折线上添加箭头、修改地图底色

页面代码 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="initial...

go语言基础学习

go基础学习,面向对象-方法在Go语言中,可以给任意自定义类型(包括内置类型,但不包括指针类型)添加相应的方法 使用= 和:=的区别: // = 使用必须使用先var声明例如: var a a=100 //或 var b = 100 //或 var c int = 100 // := 是声明并赋值,并且系统自动推断类型,不需要var关键字 d :=...

高性能的JavaScript,这是一个高级程序员必备的技能

不知道大家有没有看过高性能JavaScript,这个书是一本好书,推荐有JavaScript的基础的同学可以看一看这本书.下面是我根据这本书整理出来的知识: 1、将经常使用的对象成员、数组项、和域外变量存入局部变量 原因:数据存储位置对大地代码整体性能会产生重要的影响,直接变量和局部变量的访问速度快于数组和对象成员。因为局部变量位于作用域链的第一个对象中,全...