标签:条件 ogg bind error prot lag net ppi set
/**
* 跳转至列表页面时的主逻辑算法(绑定级联下拉框)
* @param request 请求对象
* @param modelMap 页面参数集合
* @param source 表单数据源
* @param mainEntity 主实体bean
* @param service 主业务控制器
*/
protected void toList_bind(HttpServletRequest request, ModelMap modelMap,FormSource source, SFObject mainEntity, ModuleService service) throws Exception {
PersonrangeBean personrangeBean = this.bean(request, PersonrangeBean.class, false);
modelMap.put(PersonrangeArgument.VILLAGEIDS, personrangeBean.getCommunids());
COMMUNINFOService comService = IocFactory.instance(COMMUNINFOService.class);
DataTable commTable = comService.getArea();
if(!NoneType.isNullOrEmpty(commTable)){
source.add(CommuninfoArgument.COMMUNINFO_PARENT_ID, commTable);
}
}
/**
* 跳转至列表页面
* @param request 请求对象
* @param response 响应对象
* @param modelMap 页面参数集合
* @return 页面视图控制器
*/
@RequestMapping("toList.do")
public ModelAndView toList(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) {
if( NoneType.isNullOrEmpty( request.getParameter(ContextArgument.ATTR_QUERY_TYPE) ) ){ //初始化页面的queryType查询类型
request.setAttribute(ContextArgument.ATTR_QUERY_TYPE, StatusType.UNDEFAULT);
}else{
this.backfill(request, ContextArgument.ATTR_QUERY_TYPE);
}
SFObject mainEntity = this.createMainEntity();
ModuleService service = this.createService();
FormSource source = this.source(request);
try{
this.toList_bind(request,modelMap,source,mainEntity,service);
//将页面标签(过滤条件)所需的数据源载入表单数据源内。
(
【 PersonrangeBean personrangeBean = this.bean(request, PersonrangeBean.class, false); //页面输入的查询条件
modelMap.put(PersonrangeArgument.VILLAGEIDS, personrangeBean.getCommunids()); //页面查询条件载入到模型视图标签id
】
【COMMUNINFOService comService = IocFactory.instance(COMMUNINFOService.class);
DataTable commTable = comService.getArea();
if(!NoneType.isNullOrEmpty(commTable)){
source.add(CommuninfoArgument.COMMUNINFO_PARENT_ID, commTable);
}(表单数据源添加数据)
】
)
source.put(modelMap); (查询条件载入到表单数据源)
}catch(Exception e ){
this.logger.error(e);
}
return new ModelAndView(this.getActionPath("list"), modelMap);
}
/**
* 查询社区信息并绑定至列表页面(下拉框查询)
* @param request 请求对象
* @param response 响应对象
* @param modelMap 页面参数集合
* @return 表单数据源JSON
*/
@RequestMapping("list.do")
public ModelAndView list(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) {
COMMUNINFOService service = IocFactory.instance(COMMUNINFOService.class);
try {
DataPage dataPage = this.getDataPage(request);
String orderBy = request.getParameter(ContextArgument.GRID);
COMMUNINFO bean = this.bean(request, COMMUNINFO.class);
DataTable table = service.table(bean, orderBy,dataPage);
FormSource source = this.source(request);
source.add(ContextArgument.GRID, table, orderBy );
source.add(ContextArgument.PGINFO, dataPage );
source.put(modelMap);
} catch (Exception e) {
logger.error(e);
}
return this.output(response, modelMap);
}
标签:条件 ogg bind error prot lag net ppi set
原文地址:https://www.cnblogs.com/singworld/p/9821686.html