์ฝ๋๋ก ๋์ฒดํจ
<form id="frm" action="" th:object="${userVo}" method="get">
<input type="text" th:field="*{empNm}" name="empNm"/>
</form>
formํ๊ทธ์ th:object๋ก ์๋ฒ์์ form ๋ฐ์ดํฐ๋ฅผ ๋ฐ์ Vo ์ ๋ ฅ
controller์์๋ UserVo๋ก ๋ฐ์ดํฐ๋ฅผ ๋ฐ๋๋ก ์ค์
@GetMapping(value = "list")
public Object testList(@ModelAttribute("userVo") UserVo userVo) {
... ์๋ต
}
๊ทธ ํ ํ๋ฉด์ input๊ณผ ๊ฐ์ ์๋ฆฌ๋จผํธ ํ๊ทธ์ th:field="*{vo์ ๋ด๊ธด ํ๋๋ช }"์ ์ ์ธํ๋ฉด ๋๋ค.
'IT > development' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[mybatis] ๊ฒ์(Oracle) (0) | 2023.05.06 |
---|---|
[JavaScript] ๋ ์ง ์ฌ์ด ์ผ์ ๊ณ์ฐ (0) | 2023.04.29 |
[thyemeleaf] get ๋ฐฉ์ parameter๊ฐ ๋ถ์ด๊ธฐ (0) | 2023.04.26 |
[thyemeleaf] select option๊ฐ list loop (0) | 2023.04.26 |
INSERT/UPDATE template(feat. ์์ CONCATENATE) (0) | 2023.03.05 |
๋๊ธ