You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by André Faria <an...@mandic.com.br> on 2007/01/10 18:48:45 UTC

Validation Annotation Single Method Problem (Again)

If someone know or have an example of how to use @validation annotation 
to be applied only for a single method, not for all methods, of a class, 
give-me help or tip, please!

@Validation
public AccountAction {

    private Account account;
    //setter & getter

    @Validations(requiredFields = {@RequiredFieldValidator(type = ValidatorType.SIMPLE, fieldName = "account.number", message = "You must enter a number for accont.")})
    public String save(){..};

    public String execute(){..};

    public String list(){..};

    public String remove(){..};

    public String search(){..};

}


I hope that the validation is applied only before the method save, but 
all the methods has been intercepted....
People, forgives me for insist, but couldn't find a solution yet.

Thank's
André Faria

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org