title: p:commandButton action attribute is not being called
body: <p>I am trying to submit the contents of a form to a method in a managed bean, <code>storeAppointment()</code>, however the action attribute of the commandButton is never fired. If i use the onclick attribute, then the method in the managed bean is called, however, the onclick attribute also fires when the page is loaded which is not what I want to happen. My form is as follows :</p>
  
  <pre><code>&lt;h:form&gt;
      &lt;p:growl id="msgs" showDetail="true" skipDetailIfEqualsSummary="true"&gt;
          &lt;p:autoUpdate /&gt;
      &lt;/p:growl&gt;
  
      &lt;h:panelGrid columns="2" cellpadding="5"&gt;
          &lt;p:outputLabel for="start" value="Start Time" /&gt;
          &lt;p:datePicker id="start" value="#{createAppCtrl.startTime}" showTime="true" stepMinute="5"/&gt;
  
          &lt;p:outputLabel for="finish" value="Finish Time" /&gt;
          &lt;p:datePicker id="finish" value="#{createAppCtrl.finishTime}" showTime="true" stepMinute="5"/&gt;
  
          &lt;h:outputLabel for="multiple" value="Multiple:" /&gt;
          &lt;p:selectCheckboxMenu id="multiple" value="#{createAppCtrl.selectedUsers}" label="Users" multiple="true"
                                        filter="true" filterMatchMode="startsWith" panelStyle="width:250px"&gt;
              &lt;p:ajax event="itemUnselect" listener="#{createAppCtrl.onItemUnselect}" /&gt;
                  &lt;f:selectItems value="#{createAppCtrl.involvement}" /&gt;
              &lt;/p:selectCheckboxMenu&gt;
      &lt;/h:panelGrid&gt;
  
      &lt;p:commandButton value="Submit" 
                       action="#{createAppCtrl.storeAppointment}" 
                       update="displayItems" 
                       oncomplete="PF('itemDialog').show()"/&gt;
  
      &lt;p:dialog header="Selected Items" modal="true" showEffect="fade" hideEffect="fade" widgetVar="itemDialog" width="250"&gt;
          &lt;p:outputPanel id="displayItems"&gt;
              &lt;h:outputText value="Time: " /&gt;
              &lt;h:outputText value="#{createAppCtrl.startTime}" &gt;
                  &lt;f:convertDateTime pattern="MM/dd/yyyy HH:mm" /&gt;
              &lt;/h:outputText&gt;
  
              &lt;h:outputText value="Time: " /&gt;
              &lt;h:outputText value="#{createAppCtrl.finishTime}"&gt;
                  &lt;f:convertDateTime pattern="MM/dd/yyyy HH:mm" /&gt;
              &lt;/h:outputText&gt;
  
              &lt;p:dataList value="#{createAppCtrl.selectedUsers}" var="city" emptyMessage="No cities selected" style="margin-bottom: 10px;"&gt;
                  &lt;f:facet name="header"&gt;
                      Multiple
                  &lt;/f:facet&gt;
                  #{city}
              &lt;/p:dataList&gt;
          &lt;/p:outputPanel&gt;
      &lt;/p:dialog&gt;
  &lt;/h:form&gt; 
  </code></pre>
  
  <p>When the commandButton is clicked the <code>update</code> and <code>oncomplete</code> attributes work as expected, but the dialog that is shown by <code>oncomplete</code> displays only null values. 
  And the method that is being called by <code>action</code> is <code>#{createAppCtrl.storeAppointment}</code>:</p>
  
  <pre><code>    public String storeAppointment() {
          try {
              System.out.print(startTime + "    " + finishTime + "    " + involvement);
              appointmentBean.createAppointment(startTime, finishTime, involvement);
              return "";
          } catch (Exception e) {
              System.out.print("Ctrl: " + e);
              return "";
          }
      }
  </code></pre>