@At
@Ok("fm:template.admin.unit.planAdd")
public Plan add(@Param("pid") long pid, HttpServletRequest req) {
Cnd cnd = Cnd.where("id", "=", pid);
Plan plan = planService.fetch (cnd);
System.out.println ( Json.toJson(plan));
plan = planService.dao().fetchLinks(plan, "account");
return plan;
}
@At
@Ok("fm:template.admin.unit.add")
public List<Plan> add( HttpServletRequest req) {
System.out.println ("pid");
List<Plan> list = planService.query(null, null);
return list;
}
3 回复
@Ok("fm:template.admin.unit.${req_attr.tmpl}")
protected Object ajaxOk(@Param("pid") long pid, HttpServletRequest req) {
if (pid > 0) {
//...........
req.setAttribute("tmpl", "planAdd");
return plan;
} else {
// .....
req.setAttribute("tmpl", "add");
return list;
}
}
@wendal 谢谢兽总
添加回复
请先登陆