5 Replies Latest reply on Feb 17, 2011 7:52 AM by José Freitas

    Acessing explicit Method through Unified EL.

    José Freitas Newbie

      Consider the class:

      {code}

      @Named

      @Stateless

      public class TestBean {

          private String foo = "foo";

       

          public String getFoo() {

              return foo;

          }

       

          public String testString() {

              return "testString";

          }

      }

      {code}

       

      It should be possible to access both foo property and testString method through EL v2.2, right?

       

       

       

      {code}

      <h:outputText value="#{testBean.foo}" /><br/>

      <h:outputText value="#{testBean.testString}" /><br/>

      {code}

       

      so why can't I? is there a problem in Jboss implementation of the spec?

       

      I've already tried

       

       

      {code}

       

      <h:outputText value="#{testBean.testString}" /><br/>

      <h:outputText value="#{testBean.testString()}" /><br/>

      <h:outputText value="${testBean.testString}" /><br/>

      <h:outputText value="${testBean.testString()}" /><br/>

      {code}