controller中能获取到数据,JSP中却不能正常显示,求大神看看
controller
@RequestMapping(value = {"exchangePlanDetail"})
public String findOne(HttpServletRequest request,HttpServletResponse response,Model model,EppExchangePlan eppExchangePlan,EppExchangePlanDetail eppExchangePlanDetail){
// Map<String, Object> exchangePlan = eppExchangePlanService.selectByPlanId(eppExchangePlan);
Page page = eppExchangePlanService.selectById(new Page(request, response),eppExchangePlan);
List<Map<String, Object>> list = page.getList();
page.setList(list);
model.addAttribute("page1",page);
// model.addAttribute("exchangePlan",exchangePlan);
return "epp/eppExchangePlanDetail";
}
JSP
<ui:panel title="兑换规则详情">
<ele:table page="${page1}" formId="eppExchangePlanDetailForm">
<thead>
<tr>
<th>属性</th>
<th>条件</th>
<th>开始时间</th>
<th>结束时间</th>
<th>消费规则</th>
<th>是否启用</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<c:forEach items="${page1.list}" var="epp">
<tr>
<td>${epp.conditionType}</td>
<td>${epp.tranCondition}</td>
<td><fmt:formatDate type="date" value="${epp.beginDate}" /></td>
<td><fmt:formatDate type="date" value="${epp.endDate}" /></td>
<td>${epp.ruleDesc}</td>
<td>${epp.isUsed}</td>
<td><btn:a href="${ctx}/intePlan/manage/findOne?id=${epp.id}"
name="detail" icon="fa-link">详情</btn:a></td>
</tr>
</c:forEach>
</tbody>
</ele:table>
</ui:panel>
XML
<select id="selectById" resultType="java.util.HashMap" parameterType="net.gb.zebra.epp.entity.EppExchangePlan">
select
a.CONDITION_TYPE,a.TRAN_CONDITION,a.BEGIN_TIME,a.END_TIME,b.RULE_DESC,a.IS_USED
from EPP_TRAN_RULE a,EPP_TRAN_RULE_INFO b,EPP_TRAN_PLAN_INFO c
where a.EPP_TRAN_PLAN_INFO_ID = c.ID AND b.ID = a.EPP_TRAN_RULE_INFO_ID
<if test="planId != null and planId !=''">
AND c.TRAN_PLAN_ID = #{planId,jdbcType=VARCHAR}
</if>
</select>
DEBUG过,addAttribute Page 还是有数据的,就是JSP显示不出。弄了好久了,希望大家给看看
@RequestMapping(value = {"exchangePlanDetail"})
public String findOne(HttpServletRequest request,HttpServletResponse response,Model model,EppExchangePlan eppExchangePlan,EppExchangePlanDetail eppExchangePlanDetail){
// Map<String, Object> exchangePlan = eppExchangePlanService.selectByPlanId(eppExchangePlan);
Page page = eppExchangePlanService.selectById(new Page(request, response),eppExchangePlan);
List<Map<String, Object>> list = page.getList();
page.setList(list);
model.addAttribute("page1",page);
// model.addAttribute("exchangePlan",exchangePlan);
return "epp/eppExchangePlanDetail";
}
JSP
<ui:panel title="兑换规则详情">
<ele:table page="${page1}" formId="eppExchangePlanDetailForm">
<thead>
<tr>
<th>属性</th>
<th>条件</th>
<th>开始时间</th>
<th>结束时间</th>
<th>消费规则</th>
<th>是否启用</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<c:forEach items="${page1.list}" var="epp">
<tr>
<td>${epp.conditionType}</td>
<td>${epp.tranCondition}</td>
<td><fmt:formatDate type="date" value="${epp.beginDate}" /></td>
<td><fmt:formatDate type="date" value="${epp.endDate}" /></td>
<td>${epp.ruleDesc}</td>
<td>${epp.isUsed}</td>
<td><btn:a href="${ctx}/intePlan/manage/findOne?id=${epp.id}"
name="detail" icon="fa-link">详情</btn:a></td>
</tr>
</c:forEach>
</tbody>
</ele:table>
</ui:panel>
XML
<select id="selectById" resultType="java.util.HashMap" parameterType="net.gb.zebra.epp.entity.EppExchangePlan">
select
a.CONDITION_TYPE,a.TRAN_CONDITION,a.BEGIN_TIME,a.END_TIME,b.RULE_DESC,a.IS_USED
from EPP_TRAN_RULE a,EPP_TRAN_RULE_INFO b,EPP_TRAN_PLAN_INFO c
where a.EPP_TRAN_PLAN_INFO_ID = c.ID AND b.ID = a.EPP_TRAN_RULE_INFO_ID
<if test="planId != null and planId !=''">
AND c.TRAN_PLAN_ID = #{planId,jdbcType=VARCHAR}
</if>
</select>
DEBUG过,addAttribute Page 还是有数据的,就是JSP显示不出。弄了好久了,希望大家给看看
...全文
相关推荐
springMVC如何将controller中Model数据传递到jsp页面
本篇文章主要介绍了springMVC如何将controller中Model数据传递到jsp页面,具有一定的参考价值,有兴趣的可以了解一下
springMVC如何将controller中数据传递到jsp页面
主要介绍了springMVC如何将controller中数据传递到jsp页面,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
详解springmvc 中controller与jsp传值
本篇文章主要介绍了springmvc 中controller与jsp传值,小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧
使用servlet,jdbc将mysql中数据显示在jsp页面中
使用servlet,jdbc将mysql中数据显示在jsp页面中
用jsp实现简单的用户注册功能,点提交可以在另一个jsp页面显示用户注册信息
简单的用户注册功能,有两个jsp页面,在第一个页面点提交可以在另一个jsp页面显示用户注册信息。供初学者使用


