Hi-
I am trying to test out AjaxZone so I can understand some of of the cool
new JSF 1.2 / Avatar features.
I am running JSF 1.2 and Facelets 1.1.5. I have created a Facelets taglib
for AjaxZone and registered everything in my faces-config.xml
I want to just get a super-basic version of AjaxZone running so I can see
what gets rendered when. I thought I'd modify result-set.jsp and turn it
into a Facelets xhtml file. Unfortunately, I'm stuck now because JSF 1.2
is giving duplicate ID errors. Can anybody help?
Below is the error and component stack trace. You can see the ids are all
screwed up.
Any ideas?
-adam
An Error Occurred:
Duplicate component ID table:j_id5 found in view.
+- Stack Trace
java.lang.IllegalStateException: Duplicate component ID table:j_id5 found
in view.
at
com.sun.faces.application.StateManagerImpl.checkIdUniqueness(StateManagerImpl.java:475)
at
com.sun.faces.application.StateManagerImpl.checkIdUniqueness(StateManagerImpl.java:468)
at
com.sun.faces.application.StateManagerImpl.checkIdUniqueness(StateManagerImpl.java:468)
at
com.sun.faces.application.StateManagerImpl.checkIdUniqueness(StateManagerImpl.java:468)
at
com.sun.faces.application.StateManagerImpl.checkIdUniqueness(StateManagerImpl.java:468)
at
com.sun.faces.application.StateManagerImpl.saveSerializedView(StateManagerImpl.java:338)
at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108)
at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266)
at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at
weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:26)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3151)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1311)
at
weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at
weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
+- Component Tree
<ProcessingContextViewRoot locale="en_US" renderKitId="HTML_BASIC"
rendered="true" transient="false" viewId="/result-set.xhtml">
<!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:d="
http://java.sun.com/blueprints/ui">
<head> <title>Result Set Example</title> <link rel="stylesheet"
type="text/css"
href="#{facesContext.externalContext.requestContextPath}/result-set.css"/>
<script type="text/javascript"
src="#{facesContext.externalContext.requestContextPath}/dojo.js"/> <script
type="text/javascript"
src="#{facesContext.externalContext.requestContextPath}/devtime.js"/>
</head> <body bgcolor="white"> <a
href="#{facesContext.externalContext.requestContextPath}/index.html">Back</a>
to home page. <hr/> <h3>The Scroller Component</h3>
<HtmlForm enctype="application/x-www-form-urlencoded" id="form"
prependId="false" rendered="true" submitted="false" transient="false">
Rendered via Faces components:
<AjaxZone id="subview1" rendered="true" transient="false">
<div id="fadeIn" style="position: absolute; display: none"/> <div
id="fadeOut">
<HtmlDataTable border="-2147483648"
columnClasses="list-column-center,list-column-center, list-column-center,
list-column-center" first="0" headerClass="list-header" id="table"
rendered="true" rowClasses="list-row-even,list-row-odd" rowIndex="-1"
rows="20" styleClass="list-background" transient="false" var="customer">
<UIColumn header="javax.faces.component.html.HtmlOutputText_at_4def3a"
id="j_id5" rendered="true" transient="false">
header
<HtmlOutputText escape="true" id="j_id5" rendered="true" transient="false"
value="Account Id"/>
<HtmlOutputText escape="true" id="accountId" rendered="true"
transient="false"/>
</UIColumn>
<UIColumn header="javax.faces.component.html.HtmlOutputText_at_94dc7b"
id="j_id7" rendered="true" transient="false">
header
<HtmlOutputText escape="true" id="j_id6" rendered="true" transient="false"
value="Customer Name"/>
<HtmlOutputText escape="true" id="name" rendered="true"
transient="false"/>
</UIColumn>
<UIColumn header="javax.faces.component.html.HtmlOutputText_at_1173370"
id="j_id9" rendered="true" transient="false">
header
<HtmlOutputText escape="true" id="j_id7" rendered="true" transient="false"
value="Symbol"/>
<HtmlOutputText escape="true" id="symbol" rendered="true"
transient="false"/>
</UIColumn>
<UIColumn header="javax.faces.component.html.HtmlOutputText_at_322abb"
id="j_id11" rendered="true" transient="false">
header
<HtmlOutputText escape="true" id="j_id8" rendered="true" transient="false"
value="Total Sales"/>
<HtmlOutputText escape="true" id="totalSales" rendered="true"
transient="false"/>
</UIColumn>
</HtmlDataTable>
</div>
</AjaxZone>
</HtmlForm>
</body>
</html>
</ProcessingContextViewRoot>
Adam Brod
Product Development Team