title: Faces ActionEvent.getSource always null
body: <p>I have the problem that my Faces ActionEvent returns a source, but the check on != null returns false.
  The crazy fact is, that in debug mode I get a filled ActionEvent variable.</p>
  
  <p>I have broken down the code to the important sections</p>
  
  <p>Bean:</p>
  
  <pre><code>public class HibernateUserHandling 
  {
      public void deleteUser(ActionEvent ev)
      {
          if (ev.getSource() != null &amp;&amp; ev.getSource() instanceof HtmlDataTable) {
              HtmlDataTable objHtmlDataTable = (HtmlDataTable) ev.getSource();
              setRowOfUserToDelete(objHtmlDataTable.getRowIndex());
              setPersonsCopy(HibernateDataOutput.persons);
              setUserToDelete(getPersonsCopy()[getRowOfUserToDelete()]);
              setUserIdToDelete((Integer) getUserToDelete().getUserId());
          }
  }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
          &lt;ui:composition template="./generalTemplate.xhtml"
          xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
          &lt;ui:define name="content"&gt;
              &lt;h:outputStylesheet library="css" name="cssHibernate.css" /&gt;
                  &lt;h:form id="main"&gt;
                      &lt;h:dataTable value="#{hibernateDataOutput.persons}" var="list"
                                  styleClass="order-table"
                                  headerClass="order-table-header"
                                  rowClasses="order-table-odd-row,order-table-even-row"&gt;
                          &lt;h:column&gt;
                              &lt;f:facet name="header"&gt;Delete&lt;/f:facet&gt;
                              &lt;h:commandButton id="delete" actionListener="#{hibernateUserHandling['deleteUser']}" image="delete.jpg"/&gt;
                          &lt;/h:column&gt;
                      &lt;/h:dataTable&gt;
                  &lt;/h:form&gt;
              &lt;/ui:define&gt;
          &lt;/ui:composition&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I don't get an error, it just skips the If block because of the "ev.getSource() != null".</p>
  
  <p>Thanks in advance,</p>
  
  <p>TLS</p>