在客户端怎么就是取不到JSON串?急死了,都一天了差不多
不多说了 直接上吧
action类为package org.tts4.tarena.action.score;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.struts2.json.annotations.JSON;
import org.tts4.tarena.action.ExamAction;
import org.tts4.tarena.domain.Exam;
import org.tts4.tarena.domain.ExamPaper;
import org.tts4.tarena.domain.ExamResultProxy;
import org.tts4.tarena.exception.ExamException;
import org.tts4.tarena.service.ExamPaperService;
import org.tts4.tarena.service.ExamResultProxyService;
import org.tts4.tarena.service.ExamService;
import org.tts4.tarena.utils.PageUtil;
public class AjaxGScoreAction extends ExamAction{
private static final long serialVersionUID = 1L;
//页面发送来的参数
private String choicePaperName; //需要传回给页面
private String projectPaper; //需要传回给页面
private int page; //需要传回给页面
private Integer mainclassid;
//需要的服务
private ExamPaperService examPaperService; //查找Id
private ExamService examService; //依据ID examtypeId MAINCLASSID找到exam
private ExamResultProxyService examResultProxyService; //依据examId找出同步的班级的成绩
//传回给页面的参数
private List<ExamResultProxy> examResultScores;
private List<ExamResultProxy> subExamResultScores;
private String msg="aa";
private int recordSize;
@SuppressWarnings("unchecked")
@Override
public String execute() {
...//调用一下方法为了简洁不多写了
}
public String getChoicePaperName() {
return choicePaperName;
}
public void setChoicePaperName(String choicePaperName) {
this.choicePaperName = choicePaperName;
}
public String getProjectPaper() {
return projectPaper;
}
public void setProjectPaper(String projectPaper) {
this.projectPaper = projectPaper;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
@JSON(serialize=false)
public Integer getMainclassid() {
return mainclassid;
}
public void setMainclassid(Integer mainclassid) {
this.mainclassid = mainclassid;
}
@JSON(serialize=false)
public ExamPaperService getExamPaperService() {
return examPaperService;
}
public void setExamPaperService(ExamPaperService examPaperService) {
this.examPaperService = examPaperService;
}
@JSON(serialize=false)
public ExamService getExamService() {
return examService;
}
public void setExamService(ExamService examService) {
this.examService = examService;
}
@JSON(serialize=false)
public ExamResultProxyService getExamResultProxyService() {
return examResultProxyService;
}
public void setExamResultProxyService(
ExamResultProxyService examResultProxyService) {
this.examResultProxyService = examResultProxyService;
}
@JSON(serialize=false)
public List<ExamResultProxy> getExamResultScores() {
return examResultScores;
}
public void setExamResultScores(List<ExamResultProxy> examResultScores) {
this.examResultScores = examResultScores;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
@JSON(serialize=false)
public int getRecordSize() {
return recordSize;
}
public void setRecordSize(int recordSize) {
this.recordSize = recordSize;
}
public List<ExamResultProxy> getSubExamResultScores() {
return