12.07.2015 Views

4.3.1.Action의 역할 - Anyframe

4.3.1.Action의 역할 - Anyframe

4.3.1.Action의 역할 - Anyframe

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Validatorpublic class ValidatorSampleForm extends ValidatorForm{private String userName;private String userId;private String password;private String phoneNumber;private String email;public String getUserName() {return userName;}}public void setUserName(String userName) {this.userName = userName;}//중략}7.4.formset 설정7.4.1.formset 설정 방법validator-rules.xml에 등록된 검증 규칙과 ActionForm과의 매핑을 하기 위해서는 formset을 정의해야 한다. 다음은 의 attribute들이다.AttributepropertydependspageindexedListPropertyDescriptionActionForm subclass의 property에 해당한다.하나 이상의 Validation rule들을 지정한다Multi-page ActionForm에서 페이지 번호를 지정할 때 사용ActionForm 에서 Collection을 return하는 property name7.4.2.Sample다음은 ValidatorSampleForm에 Struts에서 제공한 검증규칙을 적용하기 위해 설정한 validationsample.xml의 일부분이다.minlength4maxlength1040

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!