Back Forum Reply New

has Spring MVC create dependent controls?

in my validator I check if field is empty. Something like this:Code:public class ProfileValidator implements Validator {

@Override
public boolean supports(Class clazz) {
return clazz.equals(Profile.class);
}

@Override
public void validate(Object target, Errors errors) {
ValidationUtils.rejectIfEmptyOrWhitespace(errors, quot;namequot;,
quot;required.profileNamequot;, quot;uraquot;);
}
}
OK, it's work. But also I need check if profile name is exist (second control) in my database ONLY if the profile name is NOT empty(first control) ?
Here we have dependent controls. Can I do this in the Spring MVC?
¥
Back Forum Reply New