<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Duplicate component ID error while refresh"]]></title>
		<link>http://www.icefaces.org/JForum/posts/list/15.page</link>
		<description><![CDATA[Latest messages posted in the topic "Duplicate component ID error while refresh"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi,
With the below code when I am trying to refresh the page,I am getting the following error.I find it is the dtatatable binding after adding which I am getting the error.Would somebody please help me to solve the problem.

- Failed to execute JSP lifecycle.
java.lang.IllegalStateException: Duplicate component ID : myForm:itemID:_id8
	at com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:176)

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>&lt;f:view xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ice="http://www.icesoft.com/icefaces/component"&gt;

	&lt;ice:outputDeclaration doctypeRoot="HTML"
		doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
		doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" /&gt;

	&lt;html&gt;
	&lt;head&gt;
	&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;&lt;/meta&gt;
	&lt;link href="css/showcase_style.css" rel="stylesheet" type="text/css" /&gt;

	&lt;/head&gt;

	&lt;body&gt;

	&lt;ice:form id="myForm"&gt;
		&lt;ice:dataTable value="#{testBean.tableData}" id="itemID" rows="5"
			var="pnt" binding="#{testBean.myDataTable}"&gt;

			&lt;ice:column&gt;
				&lt;f:facet name="header"&gt;
					&lt;ice:outputText value="name" /&gt;
				&lt;/f:facet&gt;
				&lt;ice:outputText value="#{pnt.name}" /&gt;
			&lt;/ice:column&gt;
		&lt;/ice:dataTable&gt;
	&lt;/ice:form&gt;
	&lt;/body&gt;
	&lt;/html&gt;
&lt;/f:view&gt;</pre>
		</div>

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>package com.test;


import com.icesoft.faces.component.ext.HtmlDataTable;

public class TestBean {

	HtmlDataTable myDataTable = null;

	public Parent&#91;&#93; getTableData&#40;&#41; {

		return dataList;
	}

	private Parent&#91;&#93; dataList = new Parent&#91;&#93; { new Parent&#40;"XXX"&#41;,
			new Parent&#40;"YYY"&#41;, new Parent&#40;"ZZZ"&#41; };

	public class Parent {
		String name;

		public Parent&#40;String name&#41; {
			this.name = name;
		}

		public String getName&#40;&#41; {
			return name;
		}

		public void setName&#40;String name&#41; {
			this.name = name;
		}

	}

	public HtmlDataTable getMyDataTable&#40;&#41; {
		return myDataTable;
	}

	public void setMyDataTable&#40;HtmlDataTable myDataTable&#41; {
		this.myDataTable = myDataTable;
	}

}</pre>
		</div>

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>&lt;managed-bean&gt;
        &lt;description&gt;
            Backing bean that controls panel layout
        &lt;/description&gt;
        &lt;managed-bean-name&gt;testBean&lt;/managed-bean-name&gt;
        &lt;managed-bean-class&gt;
            com.test.TestBean
        &lt;/managed-bean-class&gt;
        &lt;managed-bean-scope&gt;session&lt;/managed-bean-scope&gt;
 &lt;/managed-bean&gt;</pre>
		</div>

Any help will be highly appreciated.

Thanks
Satyajit


]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#15971</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#15971</link>
				<pubDate><![CDATA[Wed, 17 Jan 2007 07:10:02]]> GMT</pubDate>
				<author><![CDATA[ satyajitchainy]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi Satyajit,

Thanks for clean posting, I was able to create an application using the code provided by you without making any changes, the good part is that I never found any exception on page refresh. 

I have tested it against ICEFaces release 1.5.1 and 1.5.2 both are working very well. Just wondering what version of icefaces you are using?

I am also attaching a war file of your example. Try to deploy it in your environment to see if it works for you as well?

Thanks,
-- Adnan Durrani --

]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#16060</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#16060</link>
				<pubDate><![CDATA[Thu, 18 Jan 2007 18:50:08]]> GMT</pubDate>
				<author><![CDATA[ adnan.durrani]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi,
Thanks for attaching the war.I have tried it in my environment,it is working perfectly.
Don't know why it is not working when I am tring to build my war.I have included ice 1.5.2 jars.My environment is Tomcat 5.5.20,jdk version 1.5.Would it be possible for you to deploy it.Possibly I am missing something.But not able to figure out the mismatch.

Thanks again,
Satyajit ]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#16087</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#16087</link>
				<pubDate><![CDATA[Fri, 19 Jan 2007 07:27:15]]> GMT</pubDate>
				<author><![CDATA[ satyajitchainy]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi Satyajit,

I have tested the war provided by you and I got the same exception as you got. I found the root cause as well, which is:

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>        &lt;context-param&gt;
            &lt;param-name&gt;com.icesoft.faces.concurrentDOMViews&lt;/param-name&gt;
            &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/context-param&gt;</pre>
		</div>

Setting the concurrentDOMViews to false in the web.xml eliminates this problem. I am adding this issue as a bug.

Thanks,
-- Adnan Durrani -- ]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#16115</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#16115</link>
				<pubDate><![CDATA[Fri, 19 Jan 2007 11:50:16]]> GMT</pubDate>
				<author><![CDATA[ adnan.durrani]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi,

short story: when using concurrentDOMViews and binding your components to a backing bean, you have to put the backing bean in request-scope.

long-story: The root cause of this issue is that concurrentDOMViews is not compatible with session-scoped bound components. You can keep concurrentDOMViews if you set your beans to request-scope. When the component is bound, there is a single instance of that component set on the bean. If the bean is in session scope, then the component is not created again the next time it is used in the same session. If the component is used in a different view of the same page, as with using concurrentDOMViews, there will be two different JSF component trees with the same instance of the bound component. That's when the 'duplicate id' error arises.

Thanks,
Philip]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#16151</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#16151</link>
				<pubDate><![CDATA[Fri, 19 Jan 2007 17:56:18]]> GMT</pubDate>
				<author><![CDATA[ philip.breau]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi,
Thanks for your explanation.It helped me a lot.
Thanks,
Satyajit]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#16312</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#16312</link>
				<pubDate><![CDATA[Tue, 23 Jan 2007 23:20:18]]> GMT</pubDate>
				<author><![CDATA[ satyajitchainy]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi,


I'm seeing this error happening again with ICEfaces 1.7.2 and JSF 1.1 running on OC4J.

I have tried all tips mentioned in this thread an others, like setting my bean to request scope instead session but it's not working.

I must mention that I have many session beans running in my application and this problem occurs with pages that don't capture information from the user such as an ice:inputText, it happens only with pages that only have command links and buttons.

So, if you have an alternative to this issue please let me know.

Thanks in advanced.

]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#44363</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#44363</link>
				<pubDate><![CDATA[Fri, 19 Dec 2008 06:13:33]]> GMT</pubDate>
				<author><![CDATA[ rob_gar_esp]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ I'm also very interested in a solution]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#45840</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#45840</link>
				<pubDate><![CDATA[Thu, 29 Jan 2009 15:58:15]]> GMT</pubDate>
				<author><![CDATA[ Willi]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ The problem was solved by adding "id" attributes to all tags in the jspx files, for some reason the tags with no ids are duplicated creating the conflicts.

Good luck!]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#45897</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#45897</link>
				<pubDate><![CDATA[Sat, 31 Jan 2009 10:13:16]]> GMT</pubDate>
				<author><![CDATA[ rob_gar_esp]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ That was a great hint! Thank's a lot!]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#45899</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#45899</link>
				<pubDate><![CDATA[Sat, 31 Jan 2009 10:52:28]]> GMT</pubDate>
				<author><![CDATA[ Willi]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ I just ran into this issue.  I have way too many tags to put IDs on all of them.  How quick can we get a fix so we don't have to put IDs on all tags?]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#49991</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#49991</link>
				<pubDate><![CDATA[Tue, 28 Apr 2009 23:14:40]]> GMT</pubDate>
				<author><![CDATA[ rickpoole]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ putting the ids to all tags on page doesn't solve this problem for me
all beans has request scope
com.icesoft.faces.concurrentDOMViews = true


my environment is icefaces 1.8 with Liferay 5.2 on glassfish 2.1]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#52701</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#52701</link>
				<pubDate><![CDATA[Thu, 18 Jun 2009 05:57:43]]> GMT</pubDate>
				<author><![CDATA[ Larry77]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ The problem occurs in this case: 
there is two pages.
first page contains <ice:dataTable binding="..." 
second page with only one <ice:commandButton action="toFirstPage"

any refresh of first page does not throws this exception.
When click on commandButton of second page (to return to the first page) then this exception  occurs]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#52704</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#52704</link>
				<pubDate><![CDATA[Thu, 18 Jun 2009 06:50:06]]> GMT</pubDate>
				<author><![CDATA[ Larry77]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ I think you are using Icefaces request scope, so that the components persists even after the navigation. Use one of the following solution

<li> Add <redirect /> to the <navigation-case> inside <navigation-rule> in Faces-Config.xml
<li> Change to normal standard request scope by adding or modifying the following lines in Web.xml
<context-param>
<param-name>com.icesoft.faces.standardRequestScope</param-name>
<param-value>true</param-value>
</context-param>

Hope this will help you.
]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#52826</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#52826</link>
				<pubDate><![CDATA[Mon, 22 Jun 2009 00:27:25]]> GMT</pubDate>
				<author><![CDATA[ cdeepak]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ yes, last solution has helped me
thx a lot!]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#52839</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#52839</link>
				<pubDate><![CDATA[Mon, 22 Jun 2009 06:00:29]]> GMT</pubDate>
				<author><![CDATA[ Larry77]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ 
What about portlets?

The same issues with component id users may see on Liferay.
Guide http://www.icefaces.org/docs/v1_8_1/htmlguide/devguide/AdvancedTopics10.html tell set concurrentDOMViews to true.

At this moment there is only one workaround - add f:subview around code with duplicate id's problem (around some includes etc)]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#59268</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#59268</link>
				<pubDate><![CDATA[Wed, 23 Dec 2009 05:10:43]]> GMT</pubDate>
				<author><![CDATA[ krokodylowy3]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi, Pls go through http://kingsekaran.blogspot.com/2010/05/jsfduplicate-component-id-error.html]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#62851</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#62851</link>
				<pubDate><![CDATA[Fri, 28 May 2010 06:55:38]]> GMT</pubDate>
				<author><![CDATA[ krajasekaranmca]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ <context-param>
<param-name>com.icesoft.faces.standardRequestScope</param-name>
<param-value>true</param-value>
</context-param> 

In addition to above declaration (it's default in my application), adding id's to all the tags solved my problem.
All the beans need not be in request scope. I have some of the beans in session scope too...also concurrentDOMViews = true (since opening multiple windows in my application).

I still have a doubt about relation between concurrentDOMViews = true and beans in session scope since its not creating any prob's to me.


Thanks,
Seshu]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#63354</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#63354</link>
				<pubDate><![CDATA[Wed, 23 Jun 2010 16:06:10]]> GMT</pubDate>
				<author><![CDATA[ seshu_roy]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ You may please refer to the following link, and do let me know if it really helped.  <a href='http://freejavaclass.com/detailpost.jsp?postid=63' target='_new' rel="nofollow">http://freejavaclass.com/detailpost.jsp?postid=63</a>]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#64613</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#64613</link>
				<pubDate><![CDATA[Wed, 8 Sep 2010 02:54:28]]> GMT</pubDate>
				<author><![CDATA[ krajasekaranmca]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ You may please refer to the following link, and do let me know if it really helped. http://freejavaclass.com/detailpost.jsp?postid=63]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#64614</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#64614</link>
				<pubDate><![CDATA[Wed, 8 Sep 2010 03:50:15]]> GMT</pubDate>
				<author><![CDATA[ krajasekaranmca]]></author>
			</item>
			<item>
				<title>Re:Duplicate component ID error while refresh</title>
				<description><![CDATA[ Hi, everybody !!!

I think that the component facet is the problem, because ... i don't know, but i was solve of this way.

this code work very well and i don't have problem

<ice:form id="formClienteView">
<ice:panelPopup id="modalPnlPop" 
                draggable="false" modal="true" 
                rendered="#{clienteView.modalRendered}" autoCentre="#{clienteView.autoCentre}"
                styleClass="corePopup">
    <f:facet name="header">
        <ice:panelGroup styleClass="popupHeaderWrapper">
		    <div class="header_right">
				<ice:commandLink id="clienteView_close" immediate="true" 
					action="#{clienteView.toggleModal}">
					<img src="./css/images/close_blue.gif" alt="Cerrar Vista de Cliente"/>
				</ice:commandLink>
		    </div>
		    <div class="header_left">
				<ice:outputText value="Cliente" styleClass="popupHeaderText"/>
	        </div>
        </ice:panelGroup>
    </f:facet>
    <f:facet name="body">
        <ice:panelGroup styleClass="popupBody">
				<ice:outputText value="Codigo Red"/>
				<ice:outputText value="Nombre" />
				<ice:outputText value="DID" />
				<ice:outputText value="No800" />
				<ice:outputText value="Sector" />
				<ice:commandButton id="addddd" value="Guardar Cliente"/>
        </ice:panelGroup>
    </f:facet>
    
</ice:panelPopup>
</ice:form>

now, compare this code

<ice:form id="formClienteView">                
<ice:panelPopup id="modalPnlPop" 
                draggable="false" modal="true" 
                rendered="#{clienteView.modalRendered}" autoCentre="#{clienteView.autoCentre}"
                styleClass="corePopup">
    <f:facet name="header">
		<ice:outputText value="Cliente" styleClass="popupHeaderText"/>
		<ice:commandLink id="clienteView_close" immediate="true" 
			action="#{clienteView.toggleModal}">
			<img src="./css/images/close_blue.gif" alt="Cerrar Vista de Cliente"/>
		</ice:commandLink>
    </f:facet>
    <f:facet name="body">
        <ice:panelGroup styleClass="popupBody">
				<ice:outputText value="Codigo Red"/>
				<ice:outputText value="Nombre" />
				<ice:outputText value="DID" />
				<ice:outputText value="No800" />
				<ice:outputText value="Sector" />
				<ice:commandButton id="addddd" value="Guardar Cliente"/>
           		<ice:commandButton id="modalPnlCloseButton" partialSubmit="true" immediate="true" value="Cancelar" actionListener="#{clienteView.toggleModal}"/>
        </ice:panelGroup>
    </f:facet>
</ice:panelPopup>
</ice:form>

can you see the difference ??

Yes is the component panelgroup after each component facet.

Test puting the panelgroup and get out the panelgroup
and get you this error

java.lang.IllegalStateException: Duplicate component ID : formClienteView:j_id58

And i don't believe that mistake is for the 

    <context-param>
        <param-name>com.icesoft.faces.concurrentDOMViews</param-name>
        <param-value>true</param-value>
    </context-param>

why? because I put a fake and the error continued

and just add the component panelgroup after each facet and waaalaaa!!!!
The problem disappear

Well, I hope you find it helpful.
]]></description>
				<guid isPermaLink="true">http://www.icefaces.org/JForum/posts/list/3417.page#69210</guid>
				<link>http://www.icefaces.org/JForum/posts/list/3417.page#69210</link>
				<pubDate><![CDATA[Tue, 24 May 2011 15:37:49]]> GMT</pubDate>
				<author><![CDATA[ cgcortes34]]></author>
			</item>
	</channel>
</rss>
