2019-05-29 17:28

@hb963724769 上国产浏览器吧,别被外国佬的浏览器卡脖子

2019-05-29 17:19

@hb963724769 你非得用哪么高版本的谷歌火狐么

2019-05-29 17:00

@hb963724769 锐浪的打印控件看看应该符合你的要求:http://www.gridreport.cn/demos/plugins/

2019-04-15 15:42

升级jfinal版本

2018-12-10 17:39

@年轻似水 前端比较渣,不一定适合你,实现方式是这样的:
提交之前使用jquery修改表单元素name属性
var htmlObj = $(".family .layui-col-md12").children(".layui-form-item");
var itemLen = htmlObj.length;
for(var i=0;i $.each($(htmlObj[i]).find("input,select"),function(index,item){
if($(item).attr("class")!="layui-input layui-unselect"){
var name = $(item).attr("name");
if(name!=undefined){
if(name.indexOf(".")!=-1){
$(item).attr("name",name.split(".")[1]);
}
name = $(item).attr("name");
//此处修改name属性为 family[0].name,family[0].age
// family[1].name,family[1].age....family[n].name,family[n].age
$(item).attr("name","family["+i+"]."+name);
}
}
});
}
然后用 jquey的表单序列化方法$(form).serialize()通过ajax提交到服务器端

2018-12-07 14:31

@年轻似水
/**
* 将页面中的数组对象转换成List
* @param request
* @param modelClass
* @param prefix
* @return
*/
public static List batchInjectModel(final HttpServletRequest request,Class modelClass, String prefix){
List modelList = new ArrayList();
int size = getArrayLength(request, prefix);
for (int i = 0; i < size; i++)
modelList.add((T) Injector.injectModel(modelClass, prefix + "[" + i + "]", request, false));
return modelList;
}

/**
* Get array length
* @param request
* @param prefix
* @return
*/
public static int getArrayLength(final HttpServletRequest request, String prefix) {

return getArrayKeys(request, prefix).size();

}

/**
* Get array key beans[0].ID -->beans[0] beans[1].ID -->beans[1]
* @param request
* @param prefix 前缀
* @return
*/
public static Set getArrayKeys(final HttpServletRequest request, String prefix) {

Set keys = new HashSet();
String arrayPrefix = prefix + "[";
String key = null;
Enumeration names = request.getParameterNames();
while (names.hasMoreElements()) {
key = names.nextElement();
if (!key.startsWith(arrayPrefix))
continue;
if (key.indexOf("]") == -1)
continue;
keys.add(key.substring(0, key.indexOf("]") + 1));// Get all bean[X]
}
return keys;
}
调用方法: List beanList = ModelUtil.batchInjectModel(getRequest(),Const.class,"beans");

2018-11-26 17:38

http://www.jfinal.com/feedback/3461

2018-10-19 10:44

2.2可以用update(String sql, Object... paras)

2018-10-19 10:34

不是还有个Db.delete(String sql, Object... paras),这个不能用么

2018-04-12 17:23

save时先调用model的remove方法把id remove掉