728x90
주소 : https://vaadin.com/directory#addon/vaadin-bean-validation
샘플
package com.vaadin.addon.beanvalidation.demo;
import javax.validation.constraints.Digits; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; public class BeanToValidate { @NotNull @Size(min = 3, max = 16) private String firstname; @NotNull(message = "Last name must not be empty") private String lastname; @Min(value = 18, message = "Must be 18 or above") @Max(150) private int age; @Digits(integer = 3, fraction = 2) private String decimals; public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getDecimals() { return decimals; } public void setDecimals(String decimals) { this.decimals = decimals; } }
반응형
'Development > WebApp' 카테고리의 다른 글
[Vaadin] CssPosition 중 Right가 적용 안 될 때 (0) | 2015.02.08 |
---|---|
[Vaadin] TestBench 3 Tutorials (0) | 2012.12.05 |
[Vaadin] Vaadin Add-ons - Spring Stuff (0) | 2012.04.26 |
[Vaadin] Book of Vaadin (0) | 2011.12.01 |
[Vaadin] Eclipse에 Vaadin Plugin 설치하기 (0) | 2011.11.19 |