title: Primefaces commandButton asynchronous actions not fired
body: <p>i have a Primefaces application in which i fire up a dialog that contains a form. The dialog has a save/cancel button-pair. Within this dialog, i do not manage to have the oncomplete, onstart, etc., methods called. I saw on other replies the cause is no AJAX is being executed. However, i do not know the reason in this case, since the commandButton is of type submit and should have ajax="true" (by default). Can anyone put a bit of light in it?</p>
  
  <p>My xhtml:
        
        </p>
  
  <pre><code>     &lt;composite:interface&gt;
          &lt;composite:attribute name="bean" required="true"/&gt;
       &lt;/composite:interface&gt;
  
       &lt;composite:implementation&gt;
          &lt;h:outputScript library="careplan" name="js/utils.js" /&gt;
  
          &lt;p:dialog id="addEventDialog" widgetVar="addEventDialog" header="#{careplanMessages['panel.title.eventAdd']}" modal="true" resizable="false"&gt;
             &lt;h:form id="eventAddForm" widgetVar="eventAddForm"&gt;
                &lt;p:fieldset legend="#{careplanMessages['label.field.data']}" &gt;
                   &lt;h:panelGrid id="formGrid" widgetVar="formGrid" columns="2" cellpadding="5"&gt;
                      &lt;p:outputLabel for="parentNode"&gt;#{careplanMessages['label.field.parentNode']}&lt;/p:outputLabel&gt;
                      &lt;p:inputText id="parentNode" label="#{careplanMessages['label.field.parentNode']}" value="#{cc.attrs.bean.parentNode}" required="true"/&gt;
  
                      &lt;p:outputLabel for="name"&gt;#{careplanMessages['label.field.eventName']}&lt;/p:outputLabel&gt;
                      &lt;h:panelGrid columns="2"&gt;
                         &lt;p:inputText id="name" label="#{careplanMessages['label.field.eventName']}" value="#{cc.attrs.bean.name}" required="true" /&gt;
                         &lt;p:message for="name" display="icon" /&gt;
                      &lt;/h:panelGrid&gt;
  
                      &lt;p:outputLabel for="description"&gt;#{careplanMessages['label.field.description']}&lt;/p:outputLabel&gt;
                      &lt;h:panelGrid columns="2"&gt;
                         &lt;p:inputTextarea id="description" label="#{careplanMessages['label.field.description']}" value="#{cc.attrs.bean.description}" rows="6" cols="33" required="true"/&gt;
                         &lt;p:message for="description" display="icon" /&gt;
                      &lt;/h:panelGrid&gt;
  
                      &lt;p:outputLabel for="minutes"&gt;#{careplanMessages['label.field.minutes']}&lt;/p:outputLabel&gt;
                      &lt;h:panelGrid columns="2"&gt;
                         &lt;p:spinner id="minutes" label="#{careplanMessages['label.field.minutes']}" value="#{cc.attrs.bean.minutes}" min="0"&gt;
                            &lt;f:validateDoubleRange minimum="1.0" /&gt;
                         &lt;/p:spinner&gt;
                         &lt;p:message for="minutes" display="icon" /&gt;
                      &lt;/h:panelGrid&gt;
  
                      &lt;p:outputLabel for="active"&gt;#{careplanMessages['label.field.active']}&lt;/p:outputLabel&gt;
                      &lt;p:selectBooleanCheckbox id="active" label="#{careplanMessages['label.field.active']}" value="#{cc.attrs.bean.active}" /&gt;
                   &lt;/h:panelGrid&gt;
                &lt;/p:fieldset&gt;
  
                &lt;p:separator /&gt;
  
                &lt;h:panelGrid columns="2" width="100%"&gt;
                   &lt;h:commandButton 
                      value="#{careplanMessages['button.save']}" 
                      onclick="alert ('onclick')" 
                      onstart="alert ('onstart')" 
                      onsuccess="alert ('onsuccess')" 
                      onerror="alert ('onerror')" 
                      oncomplete="alert ('oncomplete')"
                      styleClass="btn btn-default btn-small" /&gt;
                   &lt;h:commandButton type="button" value="#{careplanMessages['button.cancel']}" onclick="PF ('addEventDialog').hide()" styleClass="btn btn-default btn-small" /&gt;
                &lt;/h:panelGrid&gt;
             &lt;/h:form&gt;
          &lt;/p:dialog&gt;
       &lt;/composite:implementation&gt;
    &lt;/ui:composition&gt;
  </code></pre>
  
  <p>And here my backing bean:</p>
  
  <pre><code>  @ManagedBean
    @ViewScoped
    public class HouseLepEventAddBean implements Serializable {
  
       private static final Logger LOGGER = LoggerFactory.getLogger (HouseLepEventAddBean.class);
  
       private String name = null;
       private String parentNode = "test";
       private List &lt;SelectItem&gt; parentNodeList = null;
       private String description = null;
       private int minutes = 0;
       private boolean active = true;
  
       @PostConstruct
       public void init () {
  
       }
  
       public String getName () {
          return name;
       }
  
       public void setName (String name) {
          this.name = name;
       }
  
       public String getParentNode () {
          return parentNode;
       }
  
       public void setParentNode (String parentNode) {
          this.parentNode = parentNode;
       }
  
       public List &lt;SelectItem&gt; getParentNodeList () {
          return parentNodeList;
       }
  
       public void setParentNodeList (List &lt;SelectItem&gt; parentNodeList) {
          this.parentNodeList = parentNodeList;
       }
  
       public String getDescription () {
          return description;
       }
  
       public void setDescription (String description) {
          this.description = description;
       }
  
       public int getMinutes () {
          return minutes;
       }
  
       public void setMinutes (int minutes) {
          this.minutes = minutes;
       }
  
       public boolean isActive () {
          return active;
       }
  
       public void setActive (boolean active) {
          this.active = active;
       }
    }
  </code></pre>
  
  <p>Thx!</p>