struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>
Subject VisitorFieldValidation with annotations at action level
Date Tue, 28 May 2013 19:18:06 GMT
Hi,
  I have an action with a getter/setter of a bean :

public class MyAction extends ActionSupport implements Preparable {
    private BeanEvent event = null;
    public void prepare() {
        this.event = new BeanEvent();
    }
    public BeanEvent getEvent() {
        return this.event;
    }
    public void setEvent(BeanEvent e) {
        this.event = e;
    }
}

The bean is a standard Java bean with getters and setters for some
properties. I would like to validate the bean using annotations at MyAction
level, so no annotations would be needed in the BeanEvent. I understand
that the VisitorFieldValidation allows to use validation for beans, but
only when definining the actual validation in the bean. Is there any way I
could define the validation at the Action level?

Thanks
KL

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message