Object element = enumeration.nextElement();
if(element instanceof String){
String name = (String)element;
Object attr = request.getAttribute(name);
if(attr instanceof PageList){
PageList pageList = (PageList)attr;
//原属性加后缀
request.setAttribute(name+"Paginator", pageList.getPaginator());
}
}
}
if(modelAndView != null){
Map<String,Object> model = modelAndView.getModel();
Map<String,Object> newModel = new HashMap<String, Object>();
for(Map.Entry<String, Object> item : model.entrySet()){
Object attr = item.getValue();
if(attr instanceof PageList){
PageList pageList = (PageList)attr;
//原属性加后缀
newModel.put(item.getKey()+"Paginator", pageList.getPaginator());
}
}
modelAndView.addAllObjects(newModel);
}
}