title: How to attach ajax event to composite component?
body: <p>I have the following composite component (&lt;v2:inputText2&gt;)</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:composite="http://java.sun.com/jsf/composite"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:rich="http://richfaces.org/rich"&gt;
  
  &lt;!-- INTERFACE --&gt;
  &lt;composite:interface&gt;
      &lt;composite:attribute name="baseId" required="true" /&gt;
      &lt;composite:attribute name="size" required="true" /&gt;
      &lt;composite:attribute name="value" required="true" /&gt;
    &lt;composite:attribute name="align" required="false" default="" /&gt;
    &lt;composite:attribute name="label" required="false" default="" /&gt;
    &lt;composite:attribute name="labelStyle" required="false" default="" /&gt;
      &lt;composite:attribute name="disabled" required="false" default="false" /&gt;
      &lt;composite:attribute name="required" required="false" default="false" /&gt;
      &lt;composite:attribute name="inputStyle" required="false" default="" /&gt;
      &lt;composite:editableValueHolder name="inTxt" /&gt;
  &lt;/composite:interface&gt;
  
  &lt;!-- IMPLEMENTATION --&gt;
  &lt;composite:implementation&gt;
      &lt;h:panelGroup id="#{cc.attrs.baseId}Dec"&gt;
          &lt;table class="decTable" style="align:#{cc.attrs.align};" border="1"&gt;
              &lt;tr&gt;
                  &lt;td class="labelSize" style="vertical-align: middle;"&gt;
                    &lt;h:outputLabel
                          id="#{cc.attrs.baseId}Lbl" for="#{cc.attrs.baseId}"
                          value="#{cc.attrs.label}" style="#{cc.attrs.labelStyle}" /&gt;&lt;/td&gt;
  
                  &lt;td width="#{cc.attrs.size}"&gt;
                    &lt;h:inputText
                          id="inTxt" value="#{cc.attrs.value}"
                          disabled="#{cc.attrs.disabled}"
                          style="width: 99%; #{cc.attrs.inputStyle}"
                          required="#{cc.attrs.required}"&gt;
                          &lt;!-- composite:insertChildren / --&gt;
                      &lt;/h:inputText&gt;&lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td colspan="2"&gt;&lt;h:panelGroup id="#{cc.attrs.baseId}Error"&gt;
                          &lt;rich:message for="#{cc.attrs.baseid}"&gt;
                              &lt;rich:tooltip id="#{cc.attrs.baseId}TT" styleClass="validError"&gt;
                                  &lt;rich:message id="#{cc.attrs.baseId}TTMsg"
                                      for="#{cc.attrs.baseId}" showDetail="false" showSummary="true" /&gt;
                              &lt;/rich:tooltip&gt;
                          &lt;/rich:message&gt;
                      &lt;/h:panelGroup&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/h:panelGroup&gt;
  &lt;/composite:implementation&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>In the following Fragment, I want to add an &lt;a4j:ajax&gt; event to this component using like this:</p>
  
  <pre><code>    &lt;rich:panel style="width:560px;"&gt;
          &lt;f:facet name="header"&gt;
              &lt;h:outputText value="Combobox "&gt;&lt;/h:outputText&gt;
          &lt;/f:facet&gt;
          &lt;v2:inputText2 size="300px" baseId="baseId_txt" id="txt" label="Text:"
              value="#{testInput2.value}"&gt;
              &lt;a4j:ajax event="change" render="dbgText"/&gt;
          &lt;/v2:inputText2&gt;
  
          &lt;h:outputText value="#{testInput2.value}" id="dbgText"/&gt;
      &lt;/rich:panel&gt;
      &lt;aj4:commandButton id="cmdOK" value="Ok"
          action="#{testInput2.cmdOk ()}" render="@form" /&gt;
  </code></pre>
  
  <p>When I call the Testpage, then I get the following Error:</p>
  
  <pre><code>testInput2.xhtml @23,48 &lt;a4j:ajax&gt; Error: enclosing composite component does not support event change
  </code></pre>
  
  <p>How can I solve the problem?</p>
  
  <p>The Ajax-Event should trigger a UI-Bean-Methode.</p>
  
  <p>Thanks 
  Ronald</p>