日期:2014-05-17 浏览次数:20594 次
g.generateByMap(params, "htmltemplate"); //htmlTemplate(自定义的模板文件夹,可参考rapid-gennerator的template,放工程下就可以了 //params放置你要页面调用的参数,如params.add("queryParam",model.queryParam())
//list里面可以是你封装的字段对象,如FileColumn对象(包含lable,和输入框类型(是下拉还是啥的)@Override public List queryParam() { List list = new ArrayList(); FileColumn column; column = new FileColumn("设备编号", FileType.Selected); list.add(column); column = new FileColumn("设备名称", FileType.Input); list.add(column); column = new FileColumn("购买时间从", FileType.Date); list.add(column); column = new FileColumn("购买时间止", FileType.Date); list.add(column); column = new FileColumn("审批标志", FileType.Selected_boolean); list.add(column); return list; }
<#list queryParam?chunk(3) as row> <tr> <#list row as column> <td style="width:120px; text-align:right;"> <label>${column.fileName}<span>*</span></label> </td> <td style="width:160px;"> <input class="inputStyle" type="text" value="" readonly="readonly"/> </td> </#list> </tr> </#list>