SEVERE: Error Rendering View[/users.xhtml]
java.lang.IllegalStateException: Component ID form:userTable:j_id2 has already been found in the view.
Followed by:
WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IllegalStateException: CDATA tags may not nest
I heavily researched both primefaces forums and google for the id2 duplication. The fixes don't work which is primarily; wrap facet contents in </h:panelGroup>
The id duplication seems to be in the :
<p:commandLink id="cmdLink" value="#{userRec.usrName}">
<pe:selectDetailLevel id="sdl" contextValue="#{userRec}" />
-------------
type: org.primefaces.component.column.Column@22da9af3
+id: cmdLink
type: org.primefaces.component.commandlink.CommandLink@3df2d965
+id: j_id2
type: javax.faces.component.UIParameter@129e95a9
+id: j_id3
type: javax.faces.component.UIParameter@697393cb
+id: j_id4
type: javax.faces.component.UIParameter@22ec2a83
+id: j_id2
type: javax.faces.component.UIParameter@3edb105e
+id: j_id3
type: javax.faces.component.UIParameter@200fab8f
+id: j_id4
type: javax.faces.component.UIParameter@64c849ba
+id: j_id2
type: javax.faces.component.UIParameter@19608607
+id: j_id3
type: javax.faces.component.UIParameter@fff4295
+id: j_id4
type: javax.faces.component.UIParameter@3f6c4c67
+id: j_id2
type: javax.faces.component.UIParameter@5f0c1eb8
+id: j_id3
type: javax.faces.component.UIParameter@14b4f2c8
+id: j_id4
type: javax.faces.component.UIParameter@73af3316
+id: j_idt46
type: org.primefaces.component.column.Column@734324af
+id: j_idt47
type: javax.faces.component.html.HtmlOutputText@3d1d9847
+id: j_idt48
type: org.primefaces.component.column.Column@61f87ca9
----------------------
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:pe="http://primefaces.org/ui/extensions">
>
<h:head>
</h:head>
<h:body>
<ui:composition template="/templates/fullpageT.xhtml">
<ui:define name="centerT">
<h:form id="form">
<p:growl id="messages"/>
<h:panelGroup>
<pe:masterDetail id="masterDetail" selectLevelListener="#{selectLevelListener.handleNavigation}"
showAllBreadcrumbItems="true">
<pe:masterDetailLevel level="1">
<f:facet name="label">
<h:panelGroup>
<h:outputFormat value="Overview">
</h:outputFormat>
</h:panelGroup>
</f:facet>
<p:dataTable id="userTable" var="userRec" value="#{user.userList}" rowKey="#{userRec.usrId}"
selection="#{user.selectedUser}" selectionMode="single"
paginator="true" rows="100"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="10,25,50,100,250,500"
>
<f:facet name="header">
<h:panelGroup>
<h:outputFormat value="User Management"/>
</h:panelGroup>
</f:facet>
<p:column headerText="Name" sortBy="#{userRec.usrName}" filterBy="#{userRec.usrName}">
pe:
<p:commandLink id="cmdLink" value="#{userRec.usrName}">
<pe:selectDetailLevel id="sdl" contextValue="#{userRec}" />
</p:commandLink>
</p:column>
<p:column headerText="Email" sortBy="#{userRec.usrEmail}" filterBy="#{userRec.usrEmail}">
<h:outputText value="#{userRec.usrEmail}" />
</p:column>
<p:column headerText="Status" sortBy="#{userRec.usrStatus}" filterBy="#{userRec.usrStatus}">
<h:outputText value="#{userRec.usrStatus}" />
</p:column>
</p:dataTable>
</pe:masterDetailLevel>
<pe:masterDetailLevel level="2" contextVar="uRec" levelLabel="User Detail">
<h:panelGrid id="userDetail" columns="2">
<h:outputText value="Name (string)"/>
<p:inputText value="#{uRec.usrName}" required="true" label="Name"/>
<h:outputText value="Email (string)"/>
<p:inputText value="#{uRec.usrEmail}" required="true" label="Email"/>
<h:outputText value="Status (boolean)"/>
<p:inputText value="#{uRec.usrStatus}" required="true" label="Status"/>
</h:panelGrid>
</pe:masterDetailLevel>
</pe:masterDetail>
</h:panelGroup>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>