title: JSF2.0 Composite Component actionListener
body: <p>I am in need of some assistance in getting my Composite Component to behave.  I am still learning the ropes in JSF, so please excuse any ignorance that might be displayed in this post.</p>
  
  <p>So, I am working with JSF 2.0 and decided to build a composite component to make this particular code snippet reusable.  The component displays everything perfectly, but will not behave at all when trying to add the actionListener.</p>
  
  <p>Here is the code for my component</p>
  
  <pre><code>&lt;ui:composition
      xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:composite="http://java.sun.com/jsf/composite"&gt;
  
      &lt;composite:interface displayName="columnUpdate"&gt;
          &lt;composite:attribute name="id" 
              required="true" 
              displayName="id"
              shortDescription="Id to apply to this control and its child components"&gt;
          &lt;/composite:attribute&gt;
          &lt;composite:attribute 
              name="value" 
              displayName="value"
              required="true" 
              shortDescription="Field that will hold the new updated value."&gt;
          &lt;/composite:attribute&gt;
  
          &lt;composite:attribute 
              name="columnName" 
              displayName="columnName"
              required="true" 
              shortDescription="Value that will be applied as the column header"&gt;
          &lt;/composite:attribute&gt;
          &lt;composite:attribute 
              name="text"
              displayName="text"
              shortDescription="Text to be displayed above the field"&gt;
          &lt;/composite:attribute&gt;
  
          &lt;composite:actionSource name="actionEvent" targets="saveEvent"&gt;&lt;/composite:actionSource&gt;
      &lt;/composite:interface&gt;
  
      &lt;composite:implementation&gt;
          &lt;h:outputLabel value="#{cc.attrs.columnName}" onclick="showWindow('#{cc.attrs.id}')"&gt;&lt;/h:outputLabel&gt;
  
          &lt;div id="#{cc.attrs.id}" class="ccColumnUpdate"&gt;
          &lt;div id="windowClose" onclick="closeWindow('#{cc.attrs.id}');" style="top: -10px;" title="Close this window"&gt;CLOSE&lt;/div&gt;
              &lt;div&gt;
                  &lt;h:outputLabel id="lblTitle" value="#{cc.attrs.text}"&gt;&lt;/h:outputLabel&gt;
              &lt;/div&gt;
              &lt;div&gt;
                  &lt;h:inputText id="txtValue" value="#{cc.attrs.value}"&gt;&lt;/h:inputText&gt;
              &lt;/div&gt;
              &lt;div style="text-align:right;"&gt;
                  &lt;h:commandButton id="saveEvent" value="Save"&gt;&lt;/h:commandButton&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/composite:implementation&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>Here is the code in my page that uses the component:</p>
  
  <pre><code>&lt;al:columnUpdate id="cuExpenseAmount" value="#{expense.columnValue}" columnName="Expense Amount" text="Set Expense Amount to:"&gt;
    &lt;f:actionListener for="actionEvent" binding="#{expense.updateColumnValue}"&gt;
      &lt;f:ajax execute="@form"&gt;&lt;/f:ajax&gt;
    &lt;/f:actionListener&gt;
  &lt;/al:columnUpdate&gt;
  </code></pre>
  
  <p>and here is my code on the Backing Bean:</p>
  
  <pre><code>public void updateColumnValue(ActionEvent event) throws ParseException{
      //Got HERE
  
  }
  </code></pre>
  
  <p>I am not receiving any errors or hit any breakpoints I set on the backing bean.  Any help, or pointers in the right direction would be appreciated.</p>
  
  <p>Regards,</p>
  
  <p>Mike</p>