后台
@At("/xun")
@Ok("jsp:jsp.gai")
public NutMap aaa(@Param("id")int id){
NutMap map=new NutMap();
User_t user=dao.fetch(User_t.class,id);
List<BuMen> bumen= dao.query(BuMen.class, null);
map.put("bumen", bumen);
map.put("user", user);
System.err.println(Json.toJson(map));
System.err.println(Json.toJson(user));
return map;
}
前台
<%=request.getAttribute("obj")%>
<form action="${base}/tb/updata" method="post" >
<input type="hidden" name="id" value="${obj.id }">
姓名 <input type="text" name="name" value="${obj.name }"><br/>
手机 <input type="text" name="shouji" value="${obj.shouji }"><br/>
分机 <input type="text" name="fenji" value="${obj.fenji }"><br/>
Q  Q <input type="text" name="qq" value="${obj.qq }"><br/>
<c:forEach items="obj." var="o">
</c:forEach>
<button onclick="alaaa('${obj.id }')">修改</button>
</form>
obj里面的内容
{bumen=[net.wendal.nutzbook.bean.BuMen@3cdb6e14, net.wendal.nutzbook.bean.BuMen@3fac6a4d, net.wendal.nutzbook.bean.BuMen@35ccd512, net.wendal.nutzbook.bean.BuMen@4505a5bf, net.wendal.nutzbook.bean.BuMen@2249c8c5, net.wendal.nutzbook.bean.BuMen@7e6b20c3, net.wendal.nutzbook.bean.BuMen@2d5c0e59], user=net.wendal.nutzbook.bean.User_t@451c7e10}
添加回复
该帖子已被锁定,不能回复.