1.后台代码
PageHelper.startPage(getPageNo(pageNo), getPageSize(7));
List<UserAddress> historyList = userAddressService.queryList(
loginUserId(), param);
PageInfo<UserAddress> pageInfo = new PageInfo<UserAddress>(
historyList);
PageTag<UserAddress> pt = new PageTag<UserAddress>(pageInfo);
request.setAttribute("pt", pt);
request.setAttribute("param", param);
request.setAttribute("source", source);
2.jsp页面取值
<div class="sjm">
<div class="ckt">
<div class="ckv ck1">姓名</div>
<div class="ckv ck2">电话</div>
<div class="ckv ck3" style="width: 315px;">地址</div>
</div>
<c:forEach items="${pt.data}" var="address">
<div class="sj" style="cursor: pointer;"
οnclick="choseAddress('${address.addressId}','${source}','${address.name}','${address.phone}','${address.provinceName}-${address.cityName}-${address.districtName}-${address.address}');">
<div class="sjv sj1">${address.name}</div>
<div class="sjv sj2">${address.phone}</div>
<div class="sjv sj3" style="width: 315px;">${address.provinceName}${address.cityName}${address.districtName}${address.address}</div>
</div>
</c:forEach>
</div>
<!--分页开始-->