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

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]

$.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的更多相关文章

  1. springmvc 传递对象数组参数 property path is neither an array nor a List nor a Map

    Spring MVC 3: Property referenced in indexed property path is neither an array nor a List nor a Map ...

  2. CSS2Properties doesn't have an indexed property setter for '0'

    使用React时,发现chrome浏览器没事,firefox火狐浏览器报了一个CSS2Properties doesn't have an indexed property setter for '0 ...

  3. <property name="current_session_context_class">thread</property> 属性

    <property name="current_session_context_class">thread</property>这个属性的作用:这样配置是本 ...

  4. Python使用property函数和使用@property装饰器定义属性访问方法的异同点分析

    Python使用property函数和使用@property装饰器都能定义属性的get.set及delete的访问方法,他们的相同点主要如下三点: 1.定义这些方法后,代码中对相关属性的访问实际上都会 ...

  5. 第8.27节 Python中__getattribute__与property的fget、@property装饰器getter关系深入解析

    一. 引言 在<第7.23节 Python使用property函数定义属性简化属性访问的代码实现>和<第7.26节 Python中的@property装饰器定义属性访问方法gette ...

  6. react中报错Failed to set an indexed property on 'CSSStyleDeclaration': Index property setter is not supported

    产生这个报错的原因是我当时将样式写到了less文件,我在div中使用的使用应该是使用className = ,而我误写了一个style = .style里面当然没有自定义的className,所以产生 ...

  7. @property详解,@property修饰符以及各个修饰符区别(上)

    相信很多参加过面试的人员很多都会被问到:weak与assign的区别,copy与strong的区别.如果你仅仅说一点点copy一般对NSString,weak对于控件的修饰,assign对于基本类型, ...

  8. 关于obj.currentStyle.property、window.getComputedStyle(obj,null).property、obj.style.property的理解

    首先是obj,style.property 我一直用这个obj.style.property这个属性来修改内联和外联的obj属性,但是从网上看到了obj.style.property居然只能读取内嵌的 ...

  9. 飘逸的python - property及实现lazy property

    @property有什么用呢?表面看来,就是将一个方法用属性的方式来訪问. 上代码,代码最清晰了. class Circle(object): def __init__(self, radius): ...

随机推荐

  1. JxBrowser之四:对Http Response Code的处理

    1.由于各种原因,客户端或者服务端都可能出现err,比如服务端无响应的504 Gateway Time-out 4×× 客户错误 5×× 服务器错误 2.使用下面代码,当发生错误时,重新加载对应的ur ...

  2. Centos 中 service iptables stop 失败

    Centos7中的防火墙调整为firewalld,试一下systemctl stop firewalld关闭防火墙.

  3. js之Object属性封装

    在object.create出现之前,我们实现继承一般使用: function base(){} function children(){} //实现children继承base (function( ...

  4. 【Git】【1】简单介绍

    前言: Git:资源管理,版本控制:其实我之前用的是SVN,据说是不好管理分支,不过我做的项目参与人数不多,所以SVN其实是够用的 Git客户端:安转后,可以直接在文件夹进行管理,不需要用命令行形式管 ...

  5. [cf div 2 706E] Working routine

    [cf div 2 706E] Working routine Vasiliy finally got to work, where there is a huge amount of tasks w ...

  6. Mysql优化系列之——优化器对子查询的处理

    根据子查询的类型和位置不同,mysql优化器会对查询语句中的子查询采取不同的处理策略,其中包括改写为连接(join),改写为半连接(semi-join)及进行物化处理等. 标量子查询(Scalar S ...

  7. kali-rolling安装使用sonarqube教程(docker方式)

    一.说明 最近要找一款代码审计工具,Fortify SCA太贵,VisualCodeGrepper不太好用.在freebuf上看到可用sonarqube来建代码自动化扫描系统所以也来试一试. 直接安装 ...

  8. SVN客户端使用

    1.在SVN服务器添加新的用户,复制SVN URL(路径/目录). 2.在客户端电脑上下载安装SVN客户端,配置hosts文件中的内容和SVN服务器的hosts文件内容一致. hosts路径:C:\W ...

  9. python笔记13-文件读写

    1.打开文件 f=open('a.txt','a+',encoding='utf-8')#f代表的是文件对象,叫句柄 f.seek(0)把文件指针到最前 文件打开模式有3种: 1:w写模式,它是不能读 ...

  10. 2/18 (pycharm 快捷键、循环、join语句)

    Alt + Enter 快速修正 Ctrl + / 行注释/取消行注释 Ctrl + Shift +  /  块注释 Ctrl + Alt + I    自动缩进 CTRL + D  复制选定的区域或 ...