title: <a4j:commandbutton> action is only invoked on second click
body: <p>I want to submit a data table on a button click, but that action is not called on the first click. Here is my code:</p>
  
  <pre><code>&lt;h:panelGrid id="addToThisDepartmentPanel"&gt;
      &lt;h:outputText value="#{messageDataBean.message}" rendered="#{messageDataBean.isSuccess eq false}" style="color:red" id="addToThisDepartmentMessage"/&gt;
      &lt;h:form&gt;
          &lt;h:dataTable value="#{systemResultViewUtil.systemUserDetailDataBeansList}" var="departmentdetail" id="addToThisDepartmentDataTable" rendered="#{systemResultViewUtil.systemUserDetailDataBeansList.size() gt 0}"&gt;
              &lt;h:column&gt;
                 &lt;f:facet name="header"&gt;
                     Name
                 &lt;/f:facet&gt;
                 &lt;h:outputText value="#{departmentdetail.name}" style="text-align: left;padding-right: 120px" /&gt;
              &lt;/h:column&gt;
              &lt;h:column&gt;
                  &lt;f:facet name="header"&gt;
                      Current Department
                  &lt;/f:facet&gt;
                  &lt;h:outputText value="#{departmentdetail.depName}" style="text-align: left;padding-right: 120px" /&gt;
              &lt;/h:column&gt;
              &lt;h:column&gt;
                  &lt;f:facet name="header"&gt;
                      Add To This
                  &lt;/f:facet&gt;
                  &lt;h:selectBooleanCheckbox value="#{departmentdetail.cheked}" style="text-align: left;padding-right: 120px"/&gt;
              &lt;/h:column&gt;
           &lt;/h:dataTable&gt;
  
           &lt;a4j:commandButton oncomplete="if(#{messageDataBean.isSuccess eq true}){ closeAddToThisDepartmentDialog()}" value="Add TO This Department" action="#{departmentServiceBean.addEmployeeToThisDepartment}" id="addToThisDepartmentButton"
                                                         render=":addToThisDepartmentMessage :message" execute=":addToThisDepartmentDataTable" /&gt;
       &lt;/h:form&gt;
  &lt;/h:panelGrid&gt;
  </code></pre>
  
  <p>The problem is that on the second click my <code>&lt;a4j:commandButton&gt;</code> action is called. But it is not called on the first click.<br>
  Any ideas?</p>