Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
Dependencies in Bean validation framework Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dependencies in Bean validation framework


    I am using Bean Validation Framework.

    My class:-

    public class Employee {
    	private String firstName;
    	private String lastName;
    	private Department department;
    //getters and setters
    public class Department {
    	private String name;
    	private String Code;
    //getters and setters
    I want to validate some fields of Department based on some condition like,

    "if employee firstName is not null , validate the department code."

    How do i do this? i tried to use cascade= true. But this validates the entire Department. i want selective validation. i tried the cascade-condition option too. but it doesnt seem to be working. I dont know if its something wrong with the way i gave the boolean expression. can some one pls help me?


  • #2
    Is there any solution to this? I am stuck and dont know how to continue. Can some one help me?