命令按钮在p:tabView中不起作用

时间:2013-03-30 08:17:10

标签: jsf jsf-2 primefaces

我有三个选项卡可以调用单独的复合组件。我的问题是,当我点击按钮时,没有任何动作发生。但是当我单独打开我的复合组件页面时,我的按钮工作清晰。我的按钮在Tab3中。当在Tab3中调用“”bizbiz:inviteRequest“”时,我的按钮不起作用。  你能看到我的代码吗?

 <h:body>
        <h:form>
            <p:tabView >
                <p:tab id="tab1" title="#{businessPartner_msg.supplier}">
                    <h:panelGrid columns="2" cellpadding="10">
                        <bizbiz:supplier/>
                    </h:panelGrid>
                </p:tab>

                <p:tab id="tab2" title="#{businessPartner_msg.customer}">
                    <h:panelGrid columns="2" cellpadding="10">
                        <bizbiz:customer/>
                    </h:panelGrid>
                </p:tab>


                <p:tab id="tab3" title="#{businessPartner_msg.inviteRequest}">
                    <h:panelGrid columns="2" cellpadding="10">
                        <bizbiz:inviteRequest/>
                    </h:panelGrid>
                </p:tab>
            </p:tabView>
        </h:form>
    </h:body>

tab3中的按钮。这是Tab3

  <composite:implementation>
        <table style="width: 100%" id="tabell">
            <p:selectOneButton  value="#{inviteRequestManagedBean.filterType}">  
                <f:selectItem itemLabel="#{inviteRequest_msg.request}" itemValue="request" />  
                <f:selectItem itemLabel="#{inviteRequest_msg.archive}" itemValue="archive" />   
                <f:ajax event="change"  execute="@form" render="@form" />             
                <tr>
                    <td>
                        <p:panel></p:panel>

                        <p:dataGrid id="requestDataGrid" var="tBusinessPartnerRequestInfo" 
                                    value="#{inviteRequestManagedBean.filterBusinessRequest()}" columns="1" >

                            <p:column>
                                <div>
                                    <table border="0"  width="100%">
                                        <tr>
                                            <td>
                                                <p:graphicImage value="#{tBusinessPartnerRequestInfo.partySender_imageUrl}"/>
                                            </td>
                                            <td>
                                                <div>
                                                    <table border="0" width="100%">
                                                        <tr>
                                                            <td>
                                                                <h:outputLabel value="#{tBusinessPartnerRequestInfo.requestDate}"/>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <h:outputLabel value="#{tBusinessPartnerRequestInfo.partySender_fullName}"/>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </td>    

                                            <td>
                                                <p:commandButton  id="acceptCommonButton" value="#{inviteRequest_msg.accept}"
                                                                  actionListener="#{inviteRequestManagedBean.acceptRequest(tBusinessPartnerRequestInfo.id)}" 
                                                                  update="@form"/>   
                                            </td>
                                            <td>
                                                <p:commandButton  id="noNowCommonButton" value="#{inviteRequest_msg.notnow}"  
                                                                  actionListener="#{inviteRequestManagedBean.notNowRequest(tBusinessPartnerRequestInfo.id)}" 
                                                                  update="@form"/>
                                            </td>
                                            <p:blockUI block="acceptCommonButton" trigger="acceptCommonButton"/>
                                            <p:blockUI block="noNowCommonButton" trigger="acceptCommonButton"/>
                                            <p:blockUI block="acceptCommonButton" trigger="noNowCommonButton"/>
                                            <p:blockUI block="noNowCommonButton" trigger="noNowCommonButton"/>
                                            <td>
                                                <p:panel>
                                                    <p:ajaxStatus>
                                                        <f:facet name="start">
                                                            <p:graphicImage value="../resources/img/loading.gif"/>
                                                        </f:facet>
                                                        <f:facet name="complete">
                                                            <h:outputLabel value=""/>
                                                        </f:facet>
                                                    </p:ajaxStatus>
                                                </p:panel>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <hr/>
                            </p:column>
                        </p:dataGrid>                   
                    </td>
                </tr>
            </p:selectOneButton>

        </table>
    </composite:implementation>

0 个答案:

没有答案