Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Validation Annotations

André Faria

2007-01-08

Replies:

I have the following problem:

The methods execute() and list() must not be validated by the save
method rule... I have differentes validation rules for each method, but
when I call the action, the interceptor tries to validate the input
before call execute method. How can I resolve this?


@Validation
public class PersonAction {
 
  public void execute();

  public void list();

  @Validations(requiredFields = { @RequiredFieldValidator(fieldName =
"person.name", message = "Fill the name field.") })
  public void save(){}

}

Andr? Faria escreveu:
> Is possible to use the validation annotations like
> @RequiredFieldValidator only for a method of the Action class?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.