728x90
Spring MVC - JSTL Form radio 버튼
출처 : Spring MVC radiobutton and radiobuttons example
코드 객체 생성
package com.iot.db.domain; public class CodeString { private String code; private String title; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
jsp
<form:select path="breed"> <form:options items="${allBreeds}" itemValue="code" itemLabel="title" /> </form:select>
select option
<select id="cmb_code_type" style="height:35px" onchange="javascript:listCode(1);"> <c:forEach var="code" items="${list_code_type}" varStatus="status"> <option value="<c:out value="${code.id}"/>" index="${status.index}"> <c:out value="${code.title}"/> </option> </c:forEach> </select>
728x90