1.

What is the purpose of Validations annotation?

Answer»

If you want to use several annotations of the same type, these annotation must be nested within the Validations() annotation.

public class Employee extends ActionSupport{  Validations(   requiredFields =      {RequiredFieldValidator(type = ValidatorType.SIMPLE,       fieldName = "customfield",       message = "You must enter a value for field.")},   requiredStrings =      {RequiredStringValidator(type = ValidatorType.SIMPLE,       fieldName = "stringisrequired",       message = "You must enter a value for string.")}   )   public String getName() {       return name;   }}


Discussion

No Comment Found