1.需在jsp页面引入头文件:
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
2.在jsp页面的使用方法:
3.对应controller的使用:
1 2 3 4 5 6 7 8 9 10 | @RequestMapping (value = "/to_check" ,params = "id" ) public String toCheck( int id, Map<String, Object> map){ map.put( "claimVoucher" ,claimVoucherBiz.get(id)); map.put( "items" ,claimVoucherBiz.getItems(id)); map.put( "records" ,claimVoucherBiz.getRecords(id)); DealRecord dealRecord = new DealRecord(); dealRecord.setClaimVoucherId(id); map.put( "record" ,dealRecord); //通过map返回modelAttribute对应的实体对象 return "claim_voucher_check" ; } |
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持自学编程网。
- 本文固定链接: https://zxbcw.cn/post/188474/
- 转载请注明:必须在正文中标注并保留原文链接
- QQ群: PHP高手阵营官方总群(344148542)
- QQ群: Yii2.0开发(304864863)