[prev in list] [next in list] [prev in thread] [next in thread]
List: struts-user
Subject: Struts 2.2.3 annotations based validation
From: Arun Sharma <arun.s.05 () gmail ! com>
Date: 2012-01-11 11:19:36
Message-ID: CAK3_56NPk_YQcy4ySPv7Q92-shZu-yC4Dx4VoEh+ktkdpTH33g () mail ! gmail ! com
[Download RAW message or body]
Hi,
I am using *struts 2.2.3* in web application. I want to use struts2
annotations based validations for the form data submitted from UI.
The scenario is:
User fills all the form fields and click on submit button. I have created a
Person class for storing registration form data and RegistrationAction
which triggers the logic for registration. RegistrationAction holds
reference to person object with respected getters/setters.
Please suggest how to validate individual fields of Person class after form
submission, using struts 2 annotations. (Where to write field level
annotations in Action(holding reference to Person DTO) or PersonDTO
carrying form data.)
Do I need to write custom validator by extending the FieldValidatorSupport,
or alternatively the ValidatorSupport class?
--
with regards...
arun
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic