Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 4.0
-
Fix Version/s: EE-4.0.0.GA, 4.1
-
Component/s: ACE-Components, Sample Apps
-
Labels:None
-
Environment:ICEfaces4 trunk revision# 44061
Server: tomcat7.0.42
Browser: all
JSF: Myfaces v. 2.2.5 & 2.2.7
-
Assignee Priority:P2
-
Workaround Description:Removed the ID attribute for the _ace:column_ component in _dataTableDynamicColumns.xhtml_ to force Myfaces into assigning unique IDs to the created component instances.
Description
showcase built with MyFaces JSF > ace:dataTable > Dynamic Columns demo:
Server error & browser console error when clicking on dataTable "Dynamic Columns" menu link; demo page renders only after a browser refresh, but interaction with the page causes also a ViewExpiredException.
Browser console:
[window] [Tue, 17 Feb 2015 20:44:33 GMT] Error [status: malformedXML code: 200]: undefined
<partial-response><changes><update id="searchForm"><![CDATA[<form action="/showcase/showcase.jsf" enctype="application/x-www-form-urlencoded" id="searchForm" method="post" name="searchForm"><input autocomplete="off" name="ice.window" type="hidden" value="p4i69reirg" /><input autocomplete="off" name="ice.view" type="hidden" value="7i69reirg:18zr" /><script id="searchForm:searchForm_captureSubmit" type="text/javascript">i
Server error:
org.apache.myfaces.view.facelets.compiler.DuplicateIdException: Component with duplicate id "dynColF
orm:dataTable:columnHeader" found. The first component is {Component-Path : [Class: javax.faces.comp
onent.UIViewRoot,ViewId: /showcase.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_b][Cla
ss: javax.faces.component.html.HtmlPanelGroup,Id: container][Class: javax.faces.component.html.HtmlP
anelGroup,Id: __p][Class: javax.faces.component.html.HtmlPanelGroup,Id: __2p][Class: org.icefaces.ac
e.component.panel.Panel,Id: examplePanel][Class: javax.faces.component.html.HtmlPanelGroup,Id: __2s_
7][Class: javax.faces.component.html.HtmlForm,Id: dynColForm][Class: org.icefaces.ace.component.data
table.DataTable,Id: dataTable][Class: org.icefaces.ace.component.column.Column,Id: columnHeader]}
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.createAndQueueExce
ption(CheckDuplicateIdFaceletUtils.java:152)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:60)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
Server error & browser console error when clicking on dataTable "Dynamic Columns" menu link; demo page renders only after a browser refresh, but interaction with the page causes also a ViewExpiredException.
Browser console:
[window] [Tue, 17 Feb 2015 20:44:33 GMT] Error [status: malformedXML code: 200]: undefined
<partial-response><changes><update id="searchForm"><![CDATA[<form action="/showcase/showcase.jsf" enctype="application/x-www-form-urlencoded" id="searchForm" method="post" name="searchForm"><input autocomplete="off" name="ice.window" type="hidden" value="p4i69reirg" /><input autocomplete="off" name="ice.view" type="hidden" value="7i69reirg:18zr" /><script id="searchForm:searchForm_captureSubmit" type="text/javascript">i
Server error:
org.apache.myfaces.view.facelets.compiler.DuplicateIdException: Component with duplicate id "dynColF
orm:dataTable:columnHeader" found. The first component is {Component-Path : [Class: javax.faces.comp
onent.UIViewRoot,ViewId: /showcase.xhtml][Class: javax.faces.component.html.HtmlBody,Id: j_id_b][Cla
ss: javax.faces.component.html.HtmlPanelGroup,Id: container][Class: javax.faces.component.html.HtmlP
anelGroup,Id: __p][Class: javax.faces.component.html.HtmlPanelGroup,Id: __2p][Class: org.icefaces.ac
e.component.panel.Panel,Id: examplePanel][Class: javax.faces.component.html.HtmlPanelGroup,Id: __2s_
7][Class: javax.faces.component.html.HtmlForm,Id: dynColForm][Class: org.icefaces.ace.component.data
table.DataTable,Id: dataTable][Class: org.icefaces.ace.component.column.Column,Id: columnHeader]}
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.createAndQueueExce
ption(CheckDuplicateIdFaceletUtils.java:152)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:60)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
mponents(CheckDuplicateIdFaceletUtils.java:82)
at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.checkIdsStatefulCo
Activity
Carmen Cristurean
created issue -
Carmen Cristurean
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | EE-4.0.0.GA [ 11171 ] |
Ken Fyten
made changes -
Assignee | Mircea Toma [ mircea.toma ] | |
Assignee Priority | P2 [ 10011 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #44121 | Thu Feb 26 13:06:59 MST 2015 | mircea.toma | |
Files Changed | ||||
MODIFY
/icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTableDynamicColumns.xhtml
|
Mircea Toma
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Won't Fix [ 2 ] |
Mircea Toma
made changes -
Workaround Description | Removed the ID attribute for the _ace:column_ component in _dataTableDynamicColumns.xhtml_ to force Myfaces into assigning unique IDs to the created component instances. |
Ken Fyten
made changes -
Security | Private [ 10001 ] |
Ken Fyten
made changes -
Affects Version/s | 4.0 [ 11382 ] | |
Affects Version/s | EE-4.0.0.GA [ 11171 ] |
Ken Fyten
made changes -
Resolution | Won't Fix [ 2 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Mircea Toma
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Fix Version/s | 4.1 [ 11375 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
This problem turns out to be a bug in Myfaces. More precisely org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate who creates and adds the components into the component tree doesn't know to assign unique IDs to the components when the tag handler is included in a c:forEach tag. In Mojarra com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl knows how to avoid this problem. Here's the inline comment found in the relevant block of code: