spring mvc [@ResourceMapping] [1] liferayでnullのオブジェクトのリストを取得するspring MVCポートレット???spring mvc [@ResourceMapping] [1] liferay spring MVCポートレットでオブジェクトのリストを取得しますか?
何が問題ですか?
var jsonObjCommand =[{
dc: $("#dcCode").val() ,
question_Score : $("#101p").val() ,
question_Desc: $("#101d").val(),
"clinicAnalyzeQuestions.id" : 102,
"clinicAnalyzeQuestions.questions" : 'test',
"mobile" : $('#mobile').val(),
"state" : $('#state').val()
},{
dc: $("#dcCode").val() ,
question_Score : $("#102p").val() ,
question_Desc: $("#103d").val(),
"clinicAnalyzeQuestions.id" :102,
"clinicAnalyzeQuestions.questions" : 'test2',
"mobile" : $('#mobile').val(),
"state" : $('#state').val()
}];
$.ajax({
url : "${insert}",
type : 'POST',
datatype : 'json',
data : JSON.stringify(jsonObjCommand) ,
success : function(data) {
var content = JSON.parse(data);
$.each(content, function(i, state) {
$("#container2").hide();
$("#container").hide();
$("#frm1").hide();
$('#success').show();
$('#userCount4').text(state.success);
});
}
});
//コントローラ
@ModelAttribute(value = "jsonObjCommand")
public List<ClinicAnalyzeAnswers> obtenerJsonObjCommand() {
List<ClinicAnalyzeAnswers> jsonObjCommand = new ArrayList<ClinicAnalyzeAnswers>();
System.out.println(jsonObjCommand.size());
return jsonObjCommand;
}
@ModelAttribute("jsonObj1")
public ClinicPerson clinicPerson() {
ClinicPerson person = new ClinicPerson();
return person;
}
// @Transactional
@ResourceMapping("insert")
public void ajaxTestMethod(
ResourceRequest request,
ResourceResponse response,
@ModelAttribute(value = "jsonObjCommand") List<ClinicAnalyzeAnswers> jsonObjCommand,
@ModelAttribute(value = "jsonObj1") ClinicPerson person)
throws IOException, ParseException {
for (ClinicAnalyzeAnswers clinicAnalyzeAnswers : jsonObjCommand) {
System.out.println(clinicAnalyzeAnswers.getDc()+"aaa");
}
}
スプリングMVC [@ResourceMapping] [1]のLiferayスプリングMVCポートレットでヌルオブジェクトのリストを取得????コントローラのヌルで
[]配列は、私を助けて .....
何/ /問題ですか?あなたはあなたの問題を精緻化し説明することができますか? – Stuart
コントローラ内のデータが空です –