Description
I have this expression in my Facelet: #
{newPaymentBean.payment.toAccount}"payment" resolves to the following:
@Entity
public class Payment implements Serializable {
// More stuff...
@NotNull @AccountNumber private String toAccount;
// More stuff...
}
When debugging in javax.faces.validator._BeanValidatorUELUtils, I noticed the following on line 47 "ValueReference valueReference = valueExpression.getValueReference(elCtx);":
- With Glassfish EL, "valueReference.property" is null. This causes the BeanValidator to return at line 161, and to skip validation. "valueReference.base" points to the Payment object btw.
- With JUEL 2.2.3, "valueReference.property" is "toAccount", which is correct AFAIK.
I'm not sure whether this is a MyFaces or EL issue. I remember that when I wrote the BeanValidator, that the spec literally said what to do. See: http://javaserverfaces.java.net/nonav/docs/2.0/javadocs/javax/faces/validator/BeanValidator.html#validate(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
So I guess this is an EL implementation issue, but I filed it nevertheless, at least for archiving purposes...
WDYT?