@ParentPackage("json-default")
@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;
}