Results 1 to 2 of 2

Thread: Dependencies in Bean validation framework

  1. #1
    Join Date
    Sep 2007
    Posts
    7

    Default Dependencies in Bean validation framework

    Hi,

    I am using Bean Validation Framework.

    My class:-

    Code:
    public class Employee {
    	
    	private String firstName;
    	private String lastName;
    	private Department department;
    //getters and setters
    }
    Code:
    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?

    Thanks

  2. #2
    Join Date
    Sep 2007
    Posts
    7

    Default

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •