myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Lucy <>
Subject EL 3.0 Static Field References
Date Wed, 25 Mar 2015 20:14:11 GMT

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"

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
         at javax.el.BeanELResolver$BeanProperties.access$300
         at javax.el.BeanELResolver.getValue(
         at javax.el.CompositeELResolver.getValue
         ... 1 more

Where the ManagedBean is defined simply as

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

      @ManagedBean(name = "staticbean")
      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?

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