Hi All,

I'm running into some issues trying to test the EL 3.0 functionality on
MyFaces 2.2.7 + Tomcat 8.0.16.  My understanding is that we should be able
to reference static fields/methods directly from facelets, eg.

      Boolean.TRUE test: [<h:outputText id="out2"
      value="#{Boolean.TRUE}"/>]

should return "Boolean.TRUE test: [true]".  This isn't the case, however;
no value is returned, and nothing's logged.  Additionally, when I try to
access a static field on a local ManagedBean, I get

      ...
      javax.el.PropertyNotFoundException: Property 'staticReference' not
      found on type beans.EL30StaticFieldsAndMethodsBean
         at javax.el.BeanELResolver$BeanProperties.get
         (BeanELResolver.java:244)
         at javax.el.BeanELResolver$BeanProperties.access$300
         (BeanELResolver.java:221)
         at javax.el.BeanELResolver.property(BeanELResolver.java:331)
         at javax.el.BeanELResolver.getValue(BeanELResolver.java:95)
         at javax.el.CompositeELResolver.getValue
         (CompositeELResolver.java:66)
         at
         
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue
(FacesCompositeELResolver.java:179)
         ... 1 more

Where the ManagedBean is defined simply as

      package beans;
      import javax.faces.bean.ApplicationScoped;
      import javax.faces.bean.ManagedBean;

      @ManagedBean(name = "staticbean")
      @ApplicationScoped
      public class EL30StaticFieldsAndMethodsBean {
         ...
          public static final String staticReference = "static reference";
         ...
      }

Has anyone else tried working with these kinds of EL 3.0 features?  Or am I
possibly just missing something here?

Thanks,
Bill Lucy

Reply via email to