當(dāng)前位置:
首頁(yè) >
前端技术
> javascript
>内容正文
javascript
JSP页面Table的数据绑定
生活随笔
收集整理的這篇文章主要介紹了
JSP页面Table的数据绑定
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
常規(guī)綁定方式
Controller
@Controller @RequestMapping(value = "/biz/plan/daily-plan") public class DailyPlanController extends BaseController<DailyPlanExt, String> {// 日志記錄private static final Logger log = LoggerFactory.getLogger(DailyPlanController.class);@ResourceDailyPlanWebService dailyPlanWebService;@RequestMapping(method = RequestMethod.GET)public String list(Page<DailyPlanExt> page, Model model, @RequestParam Map<String, String> param) {page.setResult(dailyPlanWebService.selectDailyPlanPagedList(page, param));model.addAttribute("page", page);return this.viewName("list");} }注解
@Controller
@RequestMapping
@Resource
JSP頁(yè)面
<table id="table" class="sort-table table table-bordered table-hover" data-async="false"><thead><tr><th class="checkboxStyleTh"><input id="checkall" class="checkboxButton" type="checkbox"/> </th><th class="serialStyleTh">序號(hào)</th><th style="width: 100px">日計(jì)劃編號(hào)</th><th style="width: 100px">計(jì)劃日期</th><th style="width: 100px">檢測(cè)室</th><th style="width: 50px">是否確認(rèn)</th></tr></thead><tbody><c:forEach items="${page.result}" var="m" varStatus="status"><tr><td><input type="checkbox" class="check" name="ids" value="${m.id}"></td><td>${status.index+1}</td><td>${m.dailyPlanNo}</td><td><fmt:formatDate value='${m.planDate}' pattern='yyyy-MM-dd'/></td><td>${m.laboratory.name}</td><td><c:if test="${m.confirmationStatus==0}">未確認(rèn)</c:if><c:if test="${m.confirmationStatus==1}">已確認(rèn)</c:if><input name="confirmationStatus" type="hidden" value="${m.confirmationStatus}"></td></tr></c:forEach></tbody> </table>JSTL標(biāo)簽
<c:forEach items="${page.result}" var="m" varStatus="status"> </c:forEach><c:if test="${m.confirmationStatus==0}"> </c:if>總結(jié)
以上是生活随笔為你收集整理的JSP页面Table的数据绑定的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: jQuery中Map的使用
- 下一篇: JSP页面Table的数据拼接