retransmitTable.jsp file:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/retransmit_style.css"/>
<div>
<form:form modelAttribute="retrans" method="POST" action="/doRetransmition">
<fieldset>
<span>
<form:checkboxes items="${retransmitValues}" path="description" element="span class='label_check1'"/>
</span>
<input type="submit" name="Submit" id="Submit" value="Submit" class="button" />
</fieldset>
</form:form>
</div>

retransmit_style.css file:

fieldset { border: 0; padding-bottom: 9px; }
label
.radios {padding-top: 18px; background: url(divider.png) repeat-x 0 0; }
.label_check1{display: block; cursor: pointer; line-height: 20px; padding-bottom: 9px;}
.label_radio { margin-right: 5px; }

BgChechkController.java:
@RequestMapping(value = "/getRetransmitionTable", method = RequestMethod.GET)
public ModelAndView processSubmit(@ModelAttribute("retrans") Retransmition greeting, BindingResult result){

System.out.println("lei::getRetransmitionTable");

// FiscUser user = (FiscUser)SecurityContextHolder.getContext().getAuthentication().getPrincipal();

// boolean showRetransmit = user.getUserDetails().hasRight(AccessRight.Code.VIEW_BGCHECK_DETAILS.name());

ModelAndView mav = new ModelAndView();
List<Retransmition> list = bgCheckDao.getAllRetransmit();
for(int i = 0; i < list.size(); i ++){
System.out.println(list.get(i).getDescription());
}
mav.addObject("retransmitValues", bgCheckDao.getAllRetransmit());
mav.addObject("retransmittable", greeting);
mav.setViewName("retransmitTable");

return mav;
}

@RequestMapping(value = "/doRetransmition", method = RequestMethod.POST)
public void doRetransmition(){
System.out.println("helloworld");
}

Retransmition.java:

package com.birdiinc.fisc.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@EntityListeners({BaseEntityListener.class})
@Table(name = "RETRANSMIT_RIGHT")
public class Retransmition implements Serializable {

private String description;

@Id
@Column(name = "DESCRIPTION", nullable = false)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}

@Override
public String toString() {
return this.getDescription();
}

}

how to make form:checkboxes in JSP的更多相关文章

  1. spring <form:checkboxes> tag and css class

    I have issue with: <form:checkboxes path="roles" cssClass="checkbox" items=&q ...

  2. form:checkboxes radiobutton select用法

    <form:checkboxes path="subjects" items="${requestScope.subjects}" element=&qu ...

  3. Spring MVC-表单(Form)标签-复选框集合(Checkboxes)示例(转载实践)

    以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_checkboxes.htm 说明:示例基于Spring MVC 4.1.6. 以 ...

  4. Jsp实现form的file和text传递(multipart/form-data)

    Jsp实现form的file和text传递(multipart/form-data) 首先是form部分,因为要有<input type="file" />的类型,所以 ...

  5. JavaBean+jsp开发模式 --结合form表单 实例

    1.创建form表单 <%@ page language="java" contentType="text/html; charset=UTF-8" pa ...

  6. Spring MVC Checkbox And Checkboxes Example

    In Spring MVC, <form:checkbox /> is used to render a HTML checkbox field, the checkbox values ...

  7. [转]SpringMVC<from:form>表单标签和<input>表单标签简介

    原文地址:https://blog.csdn.net/hp_yangpeng/article/details/51906654 在使用SpringMVC的时候我们可以使用Spring封装的一系列表单标 ...

  8. Spring MVC-表单(Form)标签-列表框(Listbox)示例(转载实践)

    以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_listbox.htm 说明:示例基于Spring MVC 4.1.6. 以下示例 ...

  9. Spring MVC-表单(Form)标签-下拉框(Dropdown)示例(转载实践)

    以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_dropdown.htm 说明:示例基于Spring MVC 4.1.6. 以下示 ...

随机推荐

  1. kettle列转行

  2. 新年第一次分享sqlserver技术

    走向DBA[MSSQL篇] - 从SQL语句的角度提高数据库的访问性能 最近公司来一个非常虎的DBA,10几年的经验,这里就称之为蔡老师吧,在征得我们蔡老同意的前提下 ,我们来分享一下蔡老给我们带来的 ...

  3. 重叠I/O之可等待的重叠I/O【系列一】

    一 什么是异步I/O 同步I/O和异步I/O的关键不同就是在发出I/O请求后,线程是否会阻塞.当线程发出一个设备I/O请求的时候,线程会被挂起来,直到设备完成I/O请求为止,这称之为同步I/O.而对于 ...

  4. Cocos2d-x中Vector<T>容器以及实例介绍

    Vector<T> 是Cocos2d-x 3.x推出的列表容器,因此它所能容纳的是Ref及子类所创建的对象指针,其中的T是模板,表示能够放入到容器中的类型,在Cocos2d-x 3.x中T ...

  5. JavaScript代码检查工具 — JSHint

    静态代码检查是开发工作中不可缺少的一环,毕竟对于程序化的工作人的眼睛是不可靠的,更何况是自己的眼睛看自己的代码.即使最后的运行结果通过,但可能存在一些未定义的变量.定义了但最后没用过的变量.分号有没有 ...

  6. DDL操作前后都有COMMIT

    引用出处: http://www.itpub.net/thread-1746448-1-1.html 要说明这个问题,首先需要说明什么是DDL语句.DDL语句是数据定义语句,包括各种数据对象的创建.修 ...

  7. OpenJudge 2721 忽略大小写比较字符串大小

    1.Link: http://bailian.openjudge.cn/practice/2721/ 2.Content: 总时间限制: 1000ms 内存限制: 65536kB 描述 一般我们用st ...

  8. HTML5之 WebSockets

    ------- 新的网络连接技术 - Web-Sockets 持续连接数据流 全双工工作方式 http补充品而非替代品 - 应用场景 聊天室 股票显示 在线游戏(尤为突出) - 2byte的通信 1b ...

  9. 韩顺平细说Servlet视频系列之tom相关内容

    韩顺平细说Servlet视频系列之tom相关内容 tomcat部署项目操作(注意:6.0版本以后的支持该操作,5.x版本需要另外配置?待验证!) 项目发布到tomcat的webapps文件下,然后启动 ...

  10. 看几道JQuery试题后总结(上篇)

    无意中拿到的JQuery题目,拿来分享顺便总结总结 在JQuery对象中区分.text();.val();.html();.innerHTML;.innerTEXT()的用法与区别,用例子证明 在JQ ...