1. javaserverfaces

PropertyNotFoundException thrown for actionListener


    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Incomplete
    • Affects Version/s: 2.1.20
    • Fix Version/s: None
    • Component/s: composite components
    • Labels:


      This Bug is propably based on

      An CDI Bean of an arbitrary scope (e.g. javax.enterprise.context.RequestScoped) that has a void no-arg method which is used as an action listener for a composite component.

      import javax.enterprise.context.RequestScoped;
      import javax.inject.Named;
      public class TestBean {
          public void callActionListener() {
              System.out.println("ACTIONLISTENER CALLED");
          <cc:attribute name="value" required="true" />
          <cc:attribute name="action" targets="view" required="true" />
          <cc:attribute name="actionListener" targets="menuLink" />
          <li><h:commandLink value="#{cc.attrs.value}" id="menuLink" /></li>
      <!-- ... -->
      <m:menuActionItem value="Test" actionListener="#{testBean.callActionListener}" />
      <!-- ... -->

      com.sun.faces.facelets.el.ContextualCompositeMethodExpression is not able to resolve the EL expression to the callActionListener method of TestBean. It will throw an PropertyNonFoundExcpetion on line 208 (source is an instance of TagValueExpression) which is caught on line 214. The excpetion should be logged and the original EL exception is thrown on line 223 (well my JBoss 7 installation never reaches that point, as it throws itself an exception during the log() in line 216 when it tries to format [...]#


      [...] using java.text.MessageFormat).

      More Details
      After I click on my link JSF tries to call my action listener two times. The first time with one argument ActionEvent which fails on line 186 and then again as described above (on line 186). The second time it is called without arguments and that call succeeds.

      The strange thing about that is, that it fails only once per application server (re)start (start -> click -> fail -> click -> ok -> click -> ok -> restart -> click -> fail ...)
      I think that something is wrong during the log() call in line 216 which triggers the fail of the logger itself. Maybe some missing resource? Could you please revisit it?

      (The same command link outside of the composite component works correct.)

      Dirty workaround for now
      If I change my index.jsf to

      <!-- ... -->
      <m:menuActionItem value="Test" actionListener="#{testBean.callActionListener()}" />
      <!-- ... -->

      (notice the parentheses in the EL expression), everything works OK. But well, it is not elegant and not correct.

        Issue Links


          SteGr created issue -
          Manfred Riem made changes -
          Field Original Value New Value
          Link This issue blocks JAVASERVERFACES-2839 [ JAVASERVERFACES-2839 ]
          Manfred Riem made changes -
          Link This issue blocks JAVASERVERFACES-2839 [ JAVASERVERFACES-2839 ]
          Manfred Riem made changes -
          Link This issue is related to JAVASERVERFACES-2839 [ JAVASERVERFACES-2839 ]
          Manfred Riem made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          Manfred Riem made changes -
          Priority Minor [ 4 ] Trivial [ 5 ]
          Manfred Riem made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Incomplete [ 4 ]


            • Assignee:
            • Votes:
              1 Vote for this issue
              1 Start watching this issue


              • Created: