a4j命令按钮动作没有在丰富的弹出面板中被触发

时间:2014-06-10 01:58:32

标签: richfaces

我有一种情况,当我第二次点击OK按钮时,我的富脸部动作方法没有被调用。该操作仅被调用一次。这是丰富的弹出式面板中的按钮。我正在使用富面4和JSF2。有人可以帮忙吗?这是我的命令按钮代码。我在a4j:region

中定义了按钮
<rich:popupPanel id="twmtgsfilterMp" autosized="true" 
    domElementAttachment="parent" modal="true"
    rendered="#{filterController.showTWMGSFilter}" show="true" >

<a4j:region id="twmtgsfilterRegion">

        <a4j:outputPanel >

            <h:panelGrid columns="4">
                <h:outputText value="Vendor Name: " />
                <h:outputText id="twmtgsvendname"
                    value="#{filterController.searchFilter.vendorDetail.companyName}" />
                <a4j:commandButton id="twmtgsfilter_find" value="Find"
                    action="#{VendorController.enableModalPanel}"
                    oncomplete="if (#{facesContext.maximumSeverity != null}) #{rich:component('mperror')}.show(); else #{rich:component('mpvendor')}.show();"
                    render="pvendor,mperror">
                    <f:setPropertyActionListener
                        target="#{VendorController.filterController}"
                        value="#{filterController}"></f:setPropertyActionListener>
                    <f:setPropertyActionListener target="#{VendorController.coNum}"
                        value="#{filterController.companyNumber}"></f:setPropertyActionListener>
                    <f:setPropertyActionListener target="#{VendorController.pgSrc}"
                        value="#{filterController.pgSrc}"></f:setPropertyActionListener>
                    <f:setPropertyActionListener target="#{VendorController.includeCoNumberInSearch}"
                        value="#{!filterController.searchFilter.searchRegion}" />
                    <f:setPropertyActionListener target="#{VendorController.checkInterCompVendor}"
                            value="false"></f:setPropertyActionListener>
                </a4j:commandButton>
                <a4j:commandButton value="Clear"
                    action="#{filterController.clearVendor}"
                    render="twmmvendname,mperror"
                    oncomplete="if (#{facesContext.maximumSeverity != null}) #{rich:component('mperror')}.show();">
                </a4j:commandButton>
            </h:panelGrid>

            <rich:panel styleClass="valigntop" >
                <f:facet name="header">Invoice</f:facet>
                <h:panelGrid columns="2">
                    <h:outputText value="Invoice Number: " />
                    <h:inputText size="10" value="#{filterController.searchFilter.invoiceNumber}" />
                </h:panelGrid>

                <h:panelGrid columns="4">
                    <h:outputText value="Invoice / Shipped Date: From " />
                    <rich:calendar id="twmtgsinvshipdatefrom" inputSize="10"
                        value="#{filterController.searchFilter.invDateFrom}"
                        datePattern="MM/dd/yyyy" enableManualInput="true"
                        showWeeksBar="false" oninputblur="FixDate(this.value, this.id);">
                        <f:convertDateTime dateStyle="short" />
                    </rich:calendar>
                    <h:outputText value="To " />
                    <rich:calendar id="twmtgsinvshipdateto" inputSize="10"
                        value="#{filterController.searchFilter.invDateTo}"
                        datePattern="MM/dd/yyyy" enableManualInput="true"
                        showWeeksBar="false" oninputblur="FixDate(this.value, this.id);">
                        <f:convertDateTime dateStyle="short" />
                    </rich:calendar>
                </h:panelGrid>

                <h:panelGrid columns="3" >
                    <h:outputText value="Invoice Total: " />
                    <h:inputText size="10" id="twmtgsinvTotal" value="#{filterController.searchFilter.invTotal}" 
                        validatorMessage="Invalid amount" >
                        <f:validateRegex pattern="^(\d*?)(\.\d{1,4})?$"/>
                        <rich:validator  />
                    </h:inputText>
                    <rich:message for="invTotal" />
                </h:panelGrid>

            </rich:panel>


        </a4j:outputPanel>


        <h:panelGrid columns="3">
            <a4j:commandButton style="width:50px" value="OK" id="btwmtgfilterok"
                action="#{filterController.saveFilter}"
                onbegin="showStatus('Please wait..Filtering Data...'); return true;"
                render="tMain,mainperror,pglblsrclist" 
                oncomplete="hideStatus();if (#{commonController.facesErrors}) #{rich:component('mperror')}.show();else {#{rich:component('twmtgsfilterMp')}.hide(); if(#{commonController.gslvisible}) #{rich:component('mpgslist')}.show();}">
            </a4j:commandButton>

            <a4j:commandButton style="width:50px" value="Cancel" 
                action="#{filterController.hideFilter}" 
                render="mainperror"
                oncomplete="#{rich:component('twmtgsfilterMp')}.hide();if (#{commonController.facesErrors}) #{rich:component('mperror')}.show();">
            </a4j:commandButton>

            <a4j:commandButton style="width:50px" value="Reset" 
                action="#{filterController.resetFilter}"
                render="mainperror" 
                oncomplete="#{rich:component('twmtgsfilterMp')}.hide();if (#{commonController.facesErrors}) #{rich:component('mperror')}.show();">
            </a4j:commandButton>

        </h:panelGrid>

             
    </a4j:region> 

</rich:popupPanel>

0 个答案:

没有答案