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显示不出。弄了好久了,希望大家给看看

解决方案 »

  1.   

    ${page1} 这个传过来了吗
      

  2.   

    <c:forEach items="${page1.list}" var="epp">改为<c:forEach items="${page1}" var="epp">
      

  3.   


    传过来了,已经找到问题了  XML那里没写as...
    导致JSP拿不到数据,给大家见笑了
      

  4.   

    看错了,把table标签注释掉,看看页面是否正常,如果正常,一个字段一个字段的放出来检查,应该是某个字段取不到值