o:importConstants enum, javax.el.PropertyNotFoundException if Enum contains static member · Issue #864 · omnifaces/omnifaces (original) (raw)
Firstly a big thanks for Omnifaces,
Well i get a Error if enum contains a static member.
Example:
JSF
Enum
package org.omnifaces.showcase.model;
import java.util.EnumSet;
public enum ExampleEnum { ONE, TWO, THREE;
public String getFriendlyName() {
return name().charAt(0) + name().substring(1).toLowerCase();
}
public static final EnumSet<ExampleEnum> FOO_ENUMSET = EnumSet.of(ExampleEnum.ONE, ExampleEnum.THREE);
}
Stacktrace:Caused by: javax.el.PropertyNotFoundException: Die Eigenschaft [friendlyName] wurde für den Typ [java.util.RegularEnumSet] nicht gefunden at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:253) at javax.el.BeanELResolver$BeanProperties.access$300(BeanELResolver.java:206) at javax.el.BeanELResolver.property(BeanELResolver.java:322) at javax.el.BeanELResolver.getValue(BeanELResolver.java:93) at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:156) at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:184) at org.apache.el.parser.AstValue.getValue(AstValue.java:168) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) at org.jboss.weld.module.web.el.WeldValueExpression.getValue(WeldValueExpression.java:50) at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73) ... 93 more
Without the static member (FOO_ENUMSET), it works fine