title: JSF f:ajax listener not called when used with composite component and execute="@this"
body: <p>I have a following test composite component:</p>
  
  <pre><code>&lt;composite:interface&gt;
      &lt;composite:clientBehavior event="click" targets="#{cc.clientId}:label"
          name="click" /&gt;
  &lt;/composite:interface&gt;
  
  &lt;composite:implementation&gt;
      &lt;h:outputLabel value="click here" id="label" style="background-color: red" /&gt;
  &lt;/composite:implementation&gt;
  </code></pre>
  
  <p>and when I use it attaching f:ajax client behavior my listener method is not called on server side, but POST request reaches the server. I noticed that when I don't specify f:ajax's execute attribute or specify it as "@this" listener is not called, but with execute="@form" or "@all" it works.</p>
  
  <p>These examples don't work:</p>
  
  <pre><code>&lt;h:form&gt;
    &lt;t:testComposite&gt;
       &lt;f:ajax event="click" listener="#{bean.test}" /&gt;
     &lt;/t:testComposite&gt;
  &lt;/h:form&gt;
  
  &lt;h:form&gt;
    &lt;t:testComposite&gt;
       &lt;f:ajax event="click" listener="#{bean.test}" execute="@this"/&gt;
     &lt;/t:testComposite&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>These examples work:</p>
  
  <pre><code>&lt;h:form&gt;
    &lt;t:testComposite&gt;
       &lt;f:ajax event="click" listener="#{bean.test}" execute="@form" /&gt;
     &lt;/t:testComposite&gt;
  &lt;/h:form&gt;
  
  &lt;h:form&gt;
    &lt;t:testComposite&gt;
       &lt;f:ajax event="click" listener="#{bean.test}" execute="@all" /&gt;
     &lt;/t:testComposite&gt;
  &lt;/h:form&gt;
  
  &lt;h:form id="form"&gt;
    &lt;h:panelGroup id="group"&gt;
       &lt;t:testComposite&gt;
          &lt;f:ajax event="click" listener="#{bean.test}" execute=":form:group" /&gt;
        &lt;/t:testComposite&gt;
    &lt;/h:panelGroup&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>I tested it on tomcat 7 with myfaces 2.1.12 and jboss as7 with mojarra 2.1.18.</p>
  
  <p><strong>My question is: why doesn't f:ajax work with execute="@this" when attached to a composite component?</strong></p>