我用數據表中引用 - 行選擇從主要面向用戶的用戶列表,當我運行的頁面我面臨過這樣的錯誤頁面的無法找到標識成分「:形式:顯示」從
Cannot find component with identifier ":form:display" referenced from "j_idt24:people:0:selectButton".
代碼
<!-- the part is very important
if we did not put <ui:composition> will will get a very ugly UI
-->
<ui:composition>
<h:head>
<title>Contacts</title>
</h:head>
<!-- the part is very important -->
<body>
<h:form>
<p:growl id="msgs" showDetail="true" />
<p:dataTable id="people" var="person" value="#{personBean.users}">
<p:column headerText="ID" style="width:24%">
<h:outputText value="#{person.id}" />
</p:column>
<p:column headerText="Name" style="width:24%">
<h:outputText value="#{person.name}" />
</p:column>
<p:column headerText="Sex" style="width:24%">
<h:outputText value="#{person.sex}" />
</p:column>
<p:column headerText="Email" style="width:24%">
<h:outputText value="#{person.email}" />
</p:column>
<p:column style="width:4%">
<p:commandButton id="selectButton" oncomplete="personDialog.show()" icon="ui-icon-search" title="View" update=":form:display" >
<f:setPropertyActionListener value="#{person}" target="#{personBean.selectedPerson}" />
</p:commandButton>
</p:column>
</p:dataTable>
<p:dialog header="Person Detail" widgetVar="personDialog" resizable="false" id="perDlg"
showEffect="fade" hideEffect="explode" modal="true">
<h:panelGrid id="display" columns="2" cellpadding="4" style="margin:0 auto;">
<h:outputText value="Name:" />
<h:outputText value="#{personBean.selectedPerson.name}" style="font-weight:bold"/>
<h:outputText value="Sex" />
<h:outputText value="#{personBean.selectedPerson.sex}" style="font-weight:bold"/>
<h:outputText value="Email" />
<h:outputText value="#{personBean.selectedPerson.email}" style="font-weight:bold"/>
</h:panelGrid>
</p:dialog>
</h:form>
</body>
</ui:composition>
</html>
什麼是我的代碼的問題?
可能重複:HTTP://計算器。 com/q/8634156/870122 – perissf