@JSON(serialize=false),过滤不需要的变量
@Namespace("/class/view")
@Controller
public class ClassViewAction extends BaseAction {
private static final long serialVersionUID = 7570039029951731598L;
@Autowired
private ClassFacade classFacade;
private List<BaseClass> classList = new ArrayList<BaseClass>();
@JSON(serialize = false)
private BaseClass baseClass=new BaseClass();
public List<BaseClass> getClassList() {
return classList;
}
public void setClassList(List<BaseClass> classList) {
this.classList = classList;
}
public BaseClass getBaseClass() {
return baseClass;
}
public void setBaseClass(BaseClass baseClass) {
this.baseClass = baseClass;
}
/**
* getAllClassByID(根据学校ID查询所有的班级)
* @return
* String
*/
@Action(value="getAllClassByID",results = {
@Result(name = SUCCESS,type = "json")
})
@JSON(serialize = false)
public String getAllClassByID(){
Integer schoolID = RequestHandler.getInteger(getRequest(), "schoolID");
classList = classFacade.getAllClassByID(schoolID);
return SUCCESS;
}
}
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。