-
1. Re: duplicate Id for a component
akira_ag Sep 20, 2007 8:43 AM (in response to juanignaciosl)Yes!
I had some problem for tabbed pages. But I can't to reproduce and localize this for a small example. -
2. Re: duplicate Id for a component
juanignaciosl Sep 20, 2007 8:44 AM (in response to juanignaciosl)Using Sun RI? Did you solve it?
-
3. Re: duplicate Id for a component
akira_ag Sep 20, 2007 8:46 AM (in response to juanignaciosl)Yes, I'm using Sun RI in GlassFish v2.
But I can't solve this for now. -
4. Re: duplicate Id for a component
juanignaciosl Sep 20, 2007 10:01 AM (in response to juanignaciosl)Mmm... Glasfish v2, so you'll probably be using JSF 1.2, that's supposed to be a much better implementation. People who are stuck at 1.1 are f****d up :-\
-
5. Re: duplicate Id for a component
sergeysmirnov Sep 20, 2007 11:02 AM (in response to juanignaciosl)duplicateId is not only the problem of JSF 1.1. If you look at the lists of fixed bug for JSF 1.2 and facelets, you can find a lot of entries about fixing.
-
6. Re: duplicate Id for a component
juanignaciosl Sep 20, 2007 12:30 PM (in response to juanignaciosl)I'll stay with MyFaces then, it gives me no duplicatedId problem at all.
Thanks! -
7. Re: duplicate Id for a component
j-pro Oct 8, 2007 12:28 PM (in response to juanignaciosl)Good afternoon.
I've faced the same problem right now. Can't find a solution. I have a scrollable dataTable on my page and while it's displaying, facelets give me this error: "duplicate Id for a component staffDataTable_Form:staffDataTable:j_id33".
The strange thing is that I have two pages with such table with the same information in it. But only one gives me this error.
Here is my staff.xml (which gives the error):<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="http://richfaces.org/a4j" xmlns:c="http://java.sun.com/jstl/core" xmlns:rich="http://richfaces.org/rich"> <!--<a4j:commandButton action="#{amBean.action4EmployeeAddNewAnketa}" value="Add" focus="employeeTab" reRender=":employeesDataTable_form:employeesDataTable,:anketaTabPanel"></a4j:commandButton>--> <ui:composition template="/hr_template.xhtml"> <ui:define name="toolbar"> <ui:include src="hr_toolbar.xhtml"/> </ui:define> <ui:define name="tree"> <rich:separator height="1" style="padding:10px" /> <h:form id="structureTree_form"> <rich:tree style="width:250px" id="structureTree" styleClass="tree" switchType="ajax" ajaxSubmitSelection="true" showConnectingLines="true" changeExpandListener="#{treeMan.onDepartmentTreeExpand}" nodeSelectListener="#{treeMan.onDepartmentTreeSelect}" stateAdvisor="#{departmentTreeStateAdvisor}"> <rich:recursiveTreeNodesAdaptor roots="#{treeMan.departmentsTreeRoots}" var="item" nodes="#{item.nodes}" /> </rich:tree> </h:form> <rich:separator height="1" style="padding:10px;" /> </ui:define> <c:if test="#{amBean.isError}"> <ui:define name="result"> Changed Result </ui:define> </c:if> <ui:define name="data"> <h:form id="staffDataTable_Form"> <rich:scrollableDataTable height="200px" rowKeyVar="rkv" frozenColCount="1" binding="#{staffSDTableMan.sdTable}" selection="#{staffSDTableMan.scrollableDataTableSelection}" rowClasses="sdt_row1,sdt_row2" selectedClass="sdt_row_selected" activeClass="sdt_row_active" width="470px" id="staffDataTable" rows="#{amBean.employeeListMan.listSize}" columnClasses="sdt_col" value="#{amBean.employeeListMan.employees}" var="employee" sortMode="single"> <rich:column id="firstName"> <f:facet name="header"><h:outputText styleClass="sdt_head" value="First Name" /></f:facet> <h:outputText value="#{employee.firstName}" /> </rich:column> <rich:column id="lastName"> <f:facet name="header"><h:outputText styleClass="sdt_head" value="Last Name" /></f:facet> <h:outputText value="#{employee.lastName}" /> </rich:column> <rich:column id="sex"> <f:facet name="header"><h:outputText styleClass="sdt_head" value="Sex" /></f:facet> <h:outputText value="#{employee.sex}" /> </rich:column> <rich:column id="birthDate"> <f:facet name="header"><h:outputText styleClass="sdt_head" value="Birth Date" /></f:facet> <h:outputText value="#{employee.birthDate}" /> </rich:column> <rich:column id="birthPlace"> <f:facet name="header"><h:outputText styleClass="sdt_head" value="Birth Place" /></f:facet> <h:outputText value="#{employee.birthPlace}" /> </rich:column> </rich:scrollableDataTable> <BR style="text-size:3px;"/> <a4j:commandButton action="#{staffSDTableMan.prepareNewWorker}" value="Make prikaz"></a4j:commandButton> </h:form> <c:if test="#{staffSDTableMan.isNewWorker}"> New Worker added! </c:if> <c:if test="#{!staffSDTableMan.isNewWorker}"> New Worker was not added! </c:if> </ui:define> </ui:composition> </html>
I use JSF 1.2, Facelets, RichFaces 3.1.0.
Thanks in advance. Any advice would be appreciated. -
8. Re: duplicate Id for a component
j-pro Oct 8, 2007 12:30 PM (in response to juanignaciosl)staff.xml = staff.xhtml (sorry for that)
P.S.: This page opens from the page where the same scrollableDataTable is. So user goes there, selects a row, presses a commandButton and is redirected to staff.xhtml(where the error appears). -
9. Re: duplicate Id for a component
lucab Jul 7, 2008 6:45 AM (in response to juanignaciosl)solutions? i'm continously afflicted by this obscure problem...thinking about changing framework...
-
10. Re: duplicate Id for a component
ilya_shaikovsky Jul 7, 2008 6:53 AM (in response to juanignaciosl)This could be caused by session scoped beans which holds components bindings.
-
11. Re: duplicate Id for a component
lucab Jul 7, 2008 6:56 AM (in response to juanignaciosl)i have no beans in session scope :(