% var rowFlag = -1, preGridRowCol; for (c in table.columnList){ if (c.isEdit == '1'){ // 如果是树结构的字段,则自动忽略 if(table.isTreeEntity && @StringUtils.inStringIgnoreCase(c.columnName, 'parent_code', 'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')){ } // 如果是隐藏域 else if (c.showType == 'hidden'){ %> <${'#'}form:hidden path="${c.attrName}"/> <% } // 输出表单字段 else{ // 栅格参数获取 var gridRowCol = @StringUtils.split(c.optionMap['gridRowCol'], '/'); if (isBlank(gridRowCol) || gridRowCol.~size != 3){ if (c.showType == 'textarea'){ gridRowCol = @StringUtils.split('12/2/10', '/'); }else{ gridRowCol = @StringUtils.split('6/4/8', '/'); } } // 是否强制新行获取,生成字段界面用户设定的 var isNewLine = @Global.YES.equals(c.optionMap['isNewLine']); if (isBlank(c.optionMap['isNewLine'])){ if (c.showType == 'textarea'){ isNewLine = true; } } // 如果上一个控件占12列,则强制新行算了 if (isNotEmpty(preGridRowCol) && preGridRowCol[0] == '12'){ isNewLine = true; } // 保存上一个控件输出栅格对象 preGridRowCol = gridRowCol; // 如果完成输出2列,则换行 if(rowFlag == 2){ //isNewLine = true; } // 如果是扩展字段,则输出子标题,并且强制换行 if (@StringUtils.equalsIgnoreCase(c.columnName, 'extend_s1')){ isNewLine = true; } // 如果是第一个控件 if (rowFlag == -1){ %>