String linkPaneName = "#";
List topForms = gm.getTopOutGridFormLinks();
DOPaneModel browseModel = DOPaneModel.getPaneModelByName("pm_"
+ gm.getCategory().getName() + "_browse");
DOFormModel lastModel = (DOFormModel)cols.get(cols.size() - 1);
if("查看".equals(lastModel.getL10n())){
if(lastModel.getLinkPaneModel()!=null){
linkPaneName = lastModel.getLinkPaneModel().getName();
}
}
List lastLinkForms = lastModel.getLinkForms();
if(lastLinkForms!=null){
for(Iterator it = lastLinkForms.iterator(); it.hasNext();){
DOFormModel aFm = (DOFormModel)it.next();
if("查看".equals(aFm.getL10n()) || "Browse".equals(aFm.getL10n()) ){
if(aFm.getLinkPaneModel()!=null){
linkPaneName = aFm.getLinkPaneModel().getName();
break;
}
}
}
}
if (linkPaneName.equals("#") && browseModel != null) {
linkPaneName = browseModel.getName();
}
if (linkPaneName.equals("#")) {
if (topForms != null && topForms.size() > 0) {
DOFormModel aFm = (DOFormModel) topForms.get(0);
if (aFm.getLinkPaneModel() != null) {
linkPaneName = aFm.getLinkPaneModel().getName();
}
}
}
try{
if(gm.getService().getBo().getMainPaneModel()!=null){
linkPaneName = gm.getService().getBo().getMainPaneModel().getName();
}
}catch(Exception e){
}
// /////////////Mobile显示的列
// ////下一步可以用户定义列
// //DOGlobals.getInstance()
// .getSessoinContext().getFormInstance().getValue(
// "cols")
List showCols = new ArrayList();
List controCols = new ArrayList();
if (cols.size() > 3) {
splitCols(showCols, controCols, (DOFormModel)cols.get(0));
splitCols(showCols, controCols, (DOFormModel)cols.get(1));
splitCols(showCols, controCols, (DOFormModel)cols.get(cols.size() - 1));
/////如果最后一列是控制列,则再显示一列
if(controCols.size() >0 ){
splitCols(showCols, controCols, (DOFormModel)cols.get(2));
}
} else {
for(Iterator it = cols.iterator(); it.hasNext();){
DOFormModel aFm = (DOFormModel)it.next();
splitCols(showCols, controCols, aFm);
}
}
List bottomForms = gm.getBottomOutGridFormLinks();
for(Iterator it = topForms.iterator(); it.hasNext();){
DOFormModel aFm = (DOFormModel)it.next();
if(!aFm.getController().getName().toLowerCase().contains("selected")){
bottomForms.add(aFm);
}
}
Map<String, Object> data = new HashMap<String, Object>();