2017-06-22 16:16

我用到了jfnial-comm.jar,jfinal-1.9-bin.jar,jfinal-ext-3.0.1.jar

2017-06-22 16:15

@JFinal hi James,是不是我用的版本比较旧导致的,或者说旧版本不支持这种操作吗? 从昨晚调到现在,试了很多种情况,都不行,public void saveProject(){

Project p = this.getModel(Project.class);
p.set("project_seq", getPara("project.projectSeq"))
.set("project_short_name", getPara("project.projectShortName"))
.set("project_full_name", getPara("project.projectFullName"))
.set("project_id", getPara("project.projectId"))
.set("leader", getPara("project.leader"))
.set("start_date", getPara("project.startDate"))
.set("end_date", getPara("project.endDate"))
.set("overall_budget", getPara("project.overallBudget"))
.set("recived_amount", getPara("project.recivedAmount"))
.set("exe_rate", getPara("project.exeRate"))
.set("status", getPara("project.status"))
.set("default", getPara("project.default")).save();

this.render("/admin/purchase/new_project.html");
}

只能这样写才能被保存到数据库,但这样的话表单未被封装到一个对象里面,操作起来不是很方便,真的是无解啊