PrimeFaces无法找到表达式错误的组件

时间:2017-12-27 14:48:29

标签: jsf primefaces

我有两个xhtml:

 <h:body>      
        <ui:composition>

            <h:form id="myRequestsDialogForm">
                <p:dialog id="myRequestsDialog" header="Wniosek urlopowy: " widgetVar="wigetMyRequestsDialog"  showEffect="clip" hideEffect="clip" closable="true" resizable="false" dynamic="true" modal="true">               

                    <p:panel header="Wniosek o udzielenie urlopu:" >
                        <p:messages />
                        <h:panelGrid columns="7" cellpadding="5" >                                                     
                            <p:selectBooleanCheckbox value="#{myRequestBean.re0.mark}"  disabled="true"/>                         
                            <h:outputText value="wypoczynkowego " />  
                            <p:outputLabel style="white-space: pre-wrap; word-wrap: break-word;"/>
                            <p:outputLabel value="od Dnia:" />                           
                            <p:calendar value="#{myRequestBean.re0.fromDate}" pattern="dd.MM.yyyy" disabled="true"/>
                            <p:outputLabel value="do Dnia:" />
                            <p:calendar value="#{myRequestBean.re0.toDate}" pattern="dd.MM.yyyy" disabled="true"/>

                        </h:panelGrid>
                    </p:panel> 

                    <table style="width:100%">
                        <tr>
                            <th>
                                <p:commandButton id="cancelButton" value="Zamknij" oncomplete="PF('wigetMyRequestsDialog').hide();" />                         
                            </th>    
                        </tr>   
                    </table>

                </p:dialog> 

            </h:form>        
        </ui:composition>
    </h:body>    
</html>

<ui:composition 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

   <link href="./style/styleMyRequests.css" rel="stylesheet" type="text/css" /> 

   <ui:include src="myRequestsDialog.xhtml" /> 

   <h:form id="myRequestsForm">


        <p:dataTable value="#{myRequestBean.list}"  var="res" resizableColumns="true">  

            <p:column  headerText="Data:"  filterBy="#{res.date}" filterMatchMode="contains"> 
                <h:outputText value="#{res.date}"> 
                    <f:convertDateTime type="date" pattern="dd-MM-yyyy HH:mm"/>
                </h:outputText>    
            </p:column>
            <p:column headerText="Manager:"  filterBy="#{res.manager}" filterMatchMode="contains"> 
                <h:outputText value="#{res.manager.surname} #{res.manager.name}" /> 
            </p:column>
            <p:column headerText="Liczba dni:"  filterBy="#{res.numberOdDays}" filterMatchMode="contains"> 
                <h:outputText value="#{res.numberOdDays}"/> 
            </p:column>
            <p:column headerText="Status:"  filterBy="#{res.status}" filterMatchMode="contains"> 
                <h:outputText value="#{res.status.description}"/> 
            </p:column>
            <p:column  headerText="Wyświetl: " > 

                <p:commandButton id="modifyLink" update=":myRequestsDialogForm:myRequestsDialog" oncomplete="PF('wigetMyRequestsDialog').show();" value="Wyświetl" actionListener="#{myRequestBean.showRequest(res)}"/>

            </p:column>    
        </p:dataTable>  

   </h:form>
</ui:composition>

问题是当我尝试更新对话框时:<p:commandButton id="modifyLink" update=":myRequestsDialogForm:myRequestsDialog"我发现了一个错误:无法找到表达式的组件&#34;:myRequestsDialogForm:myRequestsDialog&#34; 并且不知道为什么。我指的是不同的形式,所以使用符号作为表单ID,然后尝试更新对话,所以使用另一个符号和对话框的id。

0 个答案:

没有答案