title: Primefaces submit function and oncomplete doesn't work with p:wizard
body: <p>After i click a submit button within wizard component, the relevant function in backing beancan't be able to invoked.</p>
  
  <p>Then i try to put attribute "process" on that Submit button and it works. However the oncomplete function won't be invoked after the function in backing bean is finished.</p>
  
  <p>Anyone can help???</p>
  
  <pre><code>&lt;f:view xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
  xmlns:p="http://primefaces.org/ui"
  xmlns:ngbf="http://ngbf.kingstar.com"&gt;
  
  
  &lt;ui:composition template="/xhtml/views/index-template.xhtml"&gt; 
      &lt;ui:define name="frame-main"&gt;
          &lt;script language="JavaScript" type="text/javascript"&gt;
              $(document).ready(function(){
              });
          &lt;/script&gt;
          &lt;style&gt;
              .columnClazz{
                  vertical-align: top;
              }
              .rowClazz{
                  vertical-align: top;
              }
          &lt;/style&gt;
          &lt;h:form id="form"&gt;
          &lt;p:wizard flowListener="#{saleOrderGenerationViewModel.onFlowProcess}" id="saleWizardId" nextLabel="下一步" backLabel="上一步" widgetVar="saleWizard"&gt;
          &lt;!--    &lt;p:tabView id="tabView"&gt; --&gt;  
              &lt;p:tab id="personalInfo" title="客户信息"&gt;
                  &lt;br/&gt;
                  &lt;p:fieldset legend="账号信息"&gt;  
                      &lt;h:panelGrid columns="2"&gt;
                          &lt;h:outputText value="银行账号 :"/&gt; 
                          &lt;p:inputText value="#{saleOrderGenerationViewModel.custInfo.bank_acc}" id="bankAcc"&gt;
                              &lt;p:ajax event="blur" listener="#{saleOrderGenerationViewModel.retrieveCustInfoByAcc}" update=":form:saleWizardId"/&gt;
                          &lt;/p:inputText&gt;
                      &lt;/h:panelGrid&gt;  
                  &lt;/p:fieldset&gt;
                  &lt;br/&gt;  
                  &lt;p:fieldset legend="基本信息"&gt;  
                      &lt;h:panelGrid columns="2"&gt;
                          &lt;h:outputText value="客户姓名:"/&gt;
                          &lt;p:inputText value="#{saleOrderGenerationViewModel.custInfo.cust_name}"/&gt;
                          &lt;h:outputText value="证件类型:"/&gt;
                          &lt;p:selectOneMenu value="#{saleOrderGenerationViewModel.custInfo.cert_type}"&gt;
                              &lt;ngbf:dictItems name="19" space="true" showValue="false"
                                  reposType="0" /&gt; 
                          &lt;/p:selectOneMenu&gt;
                          &lt;h:outputText value="证件号码:"/&gt;
                          &lt;p:inputText value="#{saleOrderGenerationViewModel.custInfo.cert_no}"/&gt;
                      &lt;/h:panelGrid&gt;  
                  &lt;/p:fieldset&gt; 
                  &lt;br/&gt;
                  &lt;p:fieldset legend="联系方式"&gt;  
                      &lt;h:panelGrid columns="4"&gt;
                          &lt;h:outputText value="电话:"/&gt;
                          &lt;p:inputText value="#{saleOrderGenerationViewModel.custInfo.phone}"/&gt;
                          &lt;h:outputText value="手机:"/&gt;
                          &lt;p:inputText value="#{saleOrderGenerationViewModel.custInfo.tel}"/&gt;
                          &lt;h:outputText value="邮箱:"/&gt;
                          &lt;p:inputText value="#{saleOrderGenerationViewModel.custInfo.email}"/&gt;
                          &lt;h:outputText value="地址:"/&gt;
                          &lt;p:inputText value="#{saleOrderGenerationViewModel.custInfo.address}"/&gt;
                          &lt;h:outputText value="邮编:"/&gt;
                          &lt;p:inputText value="#{saleOrderGenerationViewModel.custInfo.post_code}"/&gt;
                      &lt;/h:panelGrid&gt;  
                  &lt;/p:fieldset&gt;  
              &lt;/p:tab&gt; 
              &lt;p:tab id="saleInfo" title="销售信息"&gt;
              &lt;h:panelGrid id="pricePanel" columns="2" style="width:100%;" columnClasses="columnClazz" rowClasses="rowClazz"&gt;
                  &lt;h:panelGrid columns="1" style="width:400px;text-align:left;border-style:solid;border-color:#d3d3d3;"&gt;
                      &lt;p:dataTable scrollHeight="250"  id="priceData" var="item" value="#{saleOrderGenerationViewModel.quoteInfo}" 
                      scrollable="true" rowIndexVar="rowInfo" rowKey="#{item.brand_code}" selection="#{saleOrderGenerationViewModel.selectedBrand}" selectionMode="single"&gt;
                          &lt;p:ajax event="rowSelect" listener="#{saleOrderGenerationViewModel.onRowSelect}"
                                  update=":form:saleDetailData"/&gt;     
                          &lt;p:columnGroup id="columnGroup" type="header"&gt;
                              &lt;p:row&gt;
                                  &lt;p:column id="goldHeader" rendered="true" headerText="实物金" colspan="4"/&gt;
                              &lt;/p:row&gt;
                               &lt;p:row&gt;
                                  &lt;p:column id="brandHeader" rendered="true" headerText="品牌"/&gt;
                                  &lt;p:column id="quoteDateHeader" rendered="true" headerText="报价日期"/&gt;
                                  &lt;p:column id="salePriceHeader" rendered="true" headerText="卖出价"/&gt;
                                  &lt;p:column id="redeemPriceHeader" rendered="true" headerText="赎回价"/&gt;
                              &lt;/p:row&gt;
                          &lt;/p:columnGroup&gt;
                          &lt;p:column id="brand_code" rendered="true"&gt;
                              #{saleOrderGenerationViewModel.brandMap[item.brand_code]}
                          &lt;/p:column&gt;
                          &lt;p:column id="quote_date" rendered="true"&gt;
                              #{item.quote_date} 
                          &lt;/p:column&gt;
                          &lt;p:column id="salePrice" rendered="true"&gt;
                             #{item.entity_sale_price}
                          &lt;/p:column&gt;.
                          &lt;p:column id="redeemPrice" rendered="true"&gt;
                              #{item.entity_redeem_price}
                          &lt;/p:column&gt;
                      &lt;/p:dataTable&gt;
                  &lt;/h:panelGrid&gt;
                  &lt;h:panelGrid columns="1" style="text-align:left;border-style:solid;border-color:#d3d3d3;"&gt;
                      &lt;p:dataTable   id="saleDetailData" var="item" value="#{saleOrderGenerationViewModel.saleOrders}" 
                      scrollable="true"&gt;
                          &lt;p:ajax event="rowSelect" actionListener="saleOrderGenerationViewModel.onRowSelected"/&gt;
                          &lt;p:columnGroup id="detailColumnGroup" type="header"&gt;
                              &lt;p:row&gt;
                                  &lt;p:column id="saleDetailHeader" rendered="true" headerText="销售明细" colspan="6"/&gt;
                              &lt;/p:row&gt;
                               &lt;p:row&gt;
                                  &lt;p:column id="detailOper" rendered="true" headerText="操作"/&gt;
                                  &lt;p:column id="detailBrand" rendered="true" headerText="品牌"/&gt;
                                  &lt;p:column id="detailSpec" rendered="true" headerText="规格"/&gt;
                                  &lt;p:column id="detailBranchAvail" rendered="true" headerText="网点可用库存"/&gt;
                                  &lt;p:column id="detailDepotAvail" rendered="true" headerText="可用库存"/&gt;
                                  &lt;p:column id="detailAmount" rendered="true" headerText="数量"/&gt;
                              &lt;/p:row&gt;
                          &lt;/p:columnGroup&gt;
                          &lt;p:column id="operate"&gt;
                              &lt;p:commandLink
                                  actionListener="#{saleOrderGenerationViewModel.deleteSaleOrder}" value="删除" process="@this" update=":form:saleDetailData"&gt;
                                  &lt;f:attribute name="item" value="#{item}"/&gt;
                              &lt;/p:commandLink&gt;
                          &lt;/p:column&gt;
                          &lt;p:column id="brand_code" rendered="true"&gt;
                              #{saleOrderGenerationViewModel.brandMap[item.brandCode]}
                          &lt;/p:column&gt;
                          &lt;p:column id="brand_spec" rendered="true"&gt;
                              &lt;p:selectOneMenu value="#{item.spec}" id="brandSpec"&gt;
                                      &lt;f:attribute name="item" value="#{item}"/&gt;
                                      &lt;f:selectItem itemLabel="请选择规格" itemValue="" /&gt;
                                      &lt;f:selectItems value="#{item.brandSpecs}" var="b"
                                      itemLabel="#{b.spec}" itemValue="#{b.spec}"/&gt;
                                      &lt;p:ajax update=":form:saleDetailData" event="valueChange" listener="#{saleOrderGenerationViewModel.fetchStockByBrandSpec}"&gt;
                                      &lt;/p:ajax&gt;
                              &lt;/p:selectOneMenu&gt;
                               &lt;!--&lt;p:cellEditor&gt;  
                                  &lt;f:facet name="output"&gt;&lt;h:outputText value="#{item.spec}" /&gt;&lt;/f:facet&gt;  
                                  &lt;f:facet name="input"&gt;  
                                      &lt;h:selectOneMenu value="#{item.spec}" style="width:100%"&gt;  
                                          &lt;f:selectItems value="#{item.brandSpecs}" var="s" itemLabel="#{s.spec}" itemValue="#{s.spec}" /&gt;  
                                      &lt;/h:selectOneMenu&gt;  
                                  &lt;/f:facet&gt;  
                              &lt;/p:cellEditor&gt; 
                               &lt;p:autoComplete value="#{item.spec}"
                                  id="brandSpecPojo"
                                  completeMethod="#{brandSpecAutoComplete.autoComplete}" var="p"
                                  itemLabel="#{p.spec}" itemValue="#{p.spec}"
                                  forceSelection="true" dropdown="true"
                                  queryDelay="100"  scrollHeight="300"&gt;
                                  &lt;p:ajax event="focus" listener="#{saleOrderGenerationViewModel.handleFocus}"/&gt;
                              &lt;/p:autoComplete&gt;
                                --&gt;
                          &lt;/p:column&gt; 
                           &lt;p:column id="branch_avail" rendered="true"&gt;
                              #{item.branchAvail}
                          &lt;/p:column&gt;
                           &lt;p:column id="depot_avail" rendered="true"&gt;
                              #{item.depotAvail}
                          &lt;/p:column&gt;
                          &lt;p:column id="amount"&gt;
                              &lt;p:inputText value=" #{item.quantity}"&gt;
                                  &lt;p:ajax update=":form:saleDetailData" event="valueChange" /&gt;
                              &lt;/p:inputText&gt;
                          &lt;/p:column&gt;
  
                      &lt;/p:dataTable&gt;
                      &lt;p:commandButton value="提交" id="saleBut" style="float:right"
                          actionListener="#{saleOrderGenerationViewModel.doPurchaseEvent}" oncomplete="alert('aaa');" validator="#{validator.brand_spec}"
                          update=":form:returnDlg"/&gt;
                  &lt;/h:panelGrid&gt;
              &lt;/h:panelGrid&gt;
              &lt;!-- &lt;p:contextMenu for=":form:saleDetailData"&gt;  
                  &lt;p:menuitem id="delMenu" value="Delete" update=":form:saleDetailData" icon="ui-icon-close" actionListener="#{saleOrderGenerationViewModel.deleteSaleOrder}"/&gt;
              &lt;/p:contextMenu&gt; --&gt;
              &lt;/p:tab&gt;    
              &lt;p:tab id="returnInfo" title="返回信息"&gt;
              &lt;/p:tab&gt;
              &lt;!--&lt;/p:tabView&gt;--&gt;
               &lt;/p:wizard&gt;
               &lt;p:confirmDialog id="delconfirmDialog" widgetVar="delConfirmation"
                      message="确定删除吗?" header="确认" 
                      closable="true" position="center"&gt;
                          &lt;h:panelGrid columns="2"&gt;
                              &lt;p:commandButton id="delConfirm" value="确定"
                                  onclick="delConfirmation.hide()" update=":infoDialog:dialog"
                                  actionListener="#{saleOrderGenerationViewModel.deleteSaleOrder}"&gt;
                              &lt;/p:commandButton&gt;
                              &lt;p:commandButton id="delDecline" value="取消"
                                  onclick="delConfirmation.hide()" /&gt;
                          &lt;/h:panelGrid&gt;
              &lt;/p:confirmDialog&gt;
              &lt;p:dialog id="returnDlg" widgetVar="returnDlg" header="处理结果" 
                        closable="true" resizable="true" position="center"&gt;
              &lt;/p:dialog&gt;
          &lt;/h:form&gt;
          &lt;p:confirmDialog id="submitConfirmDialog" widgetVar="submitConfirmation"
                      message="确定提交吗?" header="确认" 
                      closable="true" position="center"&gt;
                          &lt;h:panelGrid columns="2"&gt;
                              &lt;p:commandButton id="submitConfirm" value="确定"
                                  onclick="submitConfirmation.hide()" update=":infoDialog:dialog"
                                  actionListener="#{saleOrderGenerationViewModel.doPurchaseEvent}" oncomplete="saleWizard.next()"&gt;
                              &lt;/p:commandButton&gt;
                              &lt;p:commandButton id="submitDecline" value="取消"
                                  onclick="submitConfirmation.hide()" /&gt;
                          &lt;/h:panelGrid&gt;
              &lt;/p:confirmDialog&gt;
  
  
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p></p>