Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/456.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Thymeleaf表单未返回json对象_Javascript_Java_Ajax_Spring_Thymeleaf - Fatal编程技术网

Javascript Thymeleaf表单未返回json对象

Javascript Thymeleaf表单未返回json对象,javascript,java,ajax,spring,thymeleaf,Javascript,Java,Ajax,Spring,Thymeleaf,我的Html页面没有以json对象的形式检索有效负载。而是返回字符串。有什么帮助吗 HTML代码段: <form th:object="${case}" novalidate="true" data-model="case" action="/hcp/patient/details/insurance" method="POST"> 访问时显式呈现选项卡解决了问题 另外,render函数实际上将负载转换为JSON对象 formController.render(tabContent

我的Html页面没有以json对象的形式检索有效负载。而是返回字符串。有什么帮助吗

HTML代码段:

<form th:object="${case}" novalidate="true" data-model="case" action="/hcp/patient/details/insurance" method="POST">

访问时显式呈现选项卡解决了问题

另外,render函数实际上将负载转换为JSON对象

formController.render(tabContent, url);

因为
payload
是字符串,所以它应该是字符串化的Json。但是字符串不是json格式。这可能会有所帮助:表单无法触发ajax调用,它将转换为json。因此我对它进行了ajax调用,但当我使用此表单访问选项卡时,呈现函数不会触发。这就是我发现的问题。期待着解决这个问题。将在完成后更新。谢谢你的回复。
formController.render(tabContent, url);