ValidationAndListSpring |
|
Your trail: |
Difference between
version 15
and
version 14:
At line 20 changed 1 line. |
To use Commons Validator with Spring MVC, normally you have to write a validation.xml file by hand. However, using XDoclet, it's much easier - we just need to add a couple of ''@spring.validator'' tags to our POJO (Person.java). Let's open it up (src/dao/**/persistence/Person.java) and modify your setFirstName and setLastName methods to resemble the following: |
To use Commons Validator with Spring MVC, normally you have to write a validation.xml file by hand. However, using XDoclet, it's much easier - we just need to add a couple of ''@spring.validator'' tags to our POJO (Person.java). Let's open it up (src/dao/**/dao/Person.java) and modify your setFirstName and setLastName methods to resemble the following: |
At line 116 changed 1 line. |
Open test/dao/**/persistence/PersonDaoTest.java and add a ''testGetPeople'' method: |
Open test/dao/**/dao/PersonDaoTest.java and add a ''testGetPeople'' method: |
Back to ValidationAndListSpring,
or to the Page History.
|