저는 봄에 선택한 콤보 박스 값을받는 방법을 찾기 위해 고심하고 있습니다. 이 methed 컨트롤러에서 실행되고, 버튼이 클릭되면봄에 콤보 박스에서 값을 얻으십시오.
<form method="post" multiple="true">
Authhor: <label th:text="*{ownerName}" /><br />
Title: <label th:text="*{name}" /><br />
Description: <label th:text="*{description}" /><br />
Price: €<label th:text="*{price}" /><br />
Product: <select th:field="${productss}" th:remove="all-but-first">
<option th:each="product : ${productss}"
th:value="${product.id}" th:text="${product.name + ' (+ €' + product.price + ')'}">Productname</option>
</select><br />
<img width="250" heigth="250" th:src="*{plainURL}"/><br />
<button align="right" class="btn" type="submit" name="add" ><span class="glyphicon glyphicon-check">Add to shopping cart</span></button><br />
</form>
:
@RequestMapping(value = IMAGE_ID, method = RequestMethod.POST, params = {"add"})
public String add(@PathVariable("id") int id, HttpSession session, Model model) {
...
return "redirect:/cart";
}
가 어떻게 점에서 콤보 박스에서 선택된 값을 수신 할 수
이
은 HTML 형태 방법? 이 같은
이 사용하려고 했 <형태 : 선택 경로 = "제품"> –