日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 前端技术 > javascript >内容正文

javascript

JSP页面Table的数据绑定

發(fā)布時(shí)間:2025/3/20 javascript 16 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。