Griffith, Michael * wrote:
The following validation annotation seems to work:
@ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE},
fetch=FetchType.EAGER)
@JoinColumn(name = "STATUS")
@ExpressionValidator(message = "Default message", key="validate.status",
expression = "status != null" )
public Status getStatus() {
return status;
}
However, the validation message appears in <s:actionerror /> block, not
nicely next to the field that failed validation as does the other
validators.
You'd probably need a @FieldExpressionValidator in order for it to be
associated with a field, but this is just a guess.
I might have expected this if I had specified shortCircut=true, but I
don't. I'm not really sure what the shortCircuit flag is supposed to do.
IIRC its intent is to prevent multiple validation errors for the same field.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org