0 Replies Latest reply on Oct 10, 2008 6:41 AM by goompas goompas

    Problem with dropdownmenu, duplicate Id for a component cont

    goompas goompas Newbie

      Hello
      I have application where i select i first dropdownmenu some value and when i press button then its binding to second dropdownmenu another values.
      Now, when i select in first dropdownmenu some value and click button, its ok and to the second dropdownmenu bind some values. But when i close application and open it again i have Exception javax.servlet.ServletException: duplicate Id for a component content:j_id_jsp_370519651_0pc4:j_id13

      This problem is only when i select value in first dropdownmenu and click button that bind other values to second dropdownmenu, next close application and open again.

      Jsp code

      <%@taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@taglib uri="http://richfaces.org/rich" prefix="rich"%>
      
      <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
      <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
      <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
      
      <%@page contentType="text/html" pageEncoding="UTF-8"%>
      
      
      <html>
       <head>
       <LINK REL="stylesheet" HREF="strony/default.css" TYPE="text/css">
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       <title>JSP Page</title>
      
      
       </head>
       <body class="body">
       <jsp:useBean class="org.my.richfaces.BeanListy" id="data">
       </jsp:useBean>
      
       <h:form >
      
       <rich:panel id="konkretnepanelgrupy" styleClass="panel" headerClass="panelHeader" bodyClass="panelBody">
       <f:facet name="header">
       <h:outputText id="konka" value="Połącz X z Y. Wybierz grupę z listy poniżej"/>
       </f:facet>
       <h:panelGrid id="konkb" columns="2">
       <rich:panel id="konkc">
       <rich:dropDownMenu styleClass="dropGroup" id="konkretnelistagrup" binding="#{BeanListy.filtersmenu['grupy']}" value="#{BeanListy.ktoragrupa}" >
       <a4j:support event="onchange" reRender="konkretnepanelwynik" action="next"/>
       </rich:dropDownMenu>
       </rich:panel>
       <rich:panel id="konkz">
       <a4j:commandButton id="konkd" styleClass="combutton" action="#{BeanListy.zerujpogrupach}" reRender="konkretneprefsufb" value="Zaladuj"/>
       </rich:panel>
       </h:panelGrid>
       </rich:panel>
      
      <rich:panel id ="konkretneprefsufb" bodyClass="panelBody">
       <h:panelGrid id="konke" columns="3">
       <rich:panel id="konkretnepref1" styleClass="panelListy">
       <rich:dropDownMenu id="konkretnelistapref1" binding="#{BeanListy.filtersmenu['tprefixy1']}" value="#{BeanListy.wybranyprefix1}"/>
       </rich:panel>
       </h:panelGrid>
       </rich:panel>
       </h:form>
       </body>
      </html>


      Full Exception report

      type Exception report
      
      message
      
      description The server encountered an internal error () that prevented it from fulfilling this request.
      
      exception
      
      javax.servlet.ServletException: duplicate Id for a component content:j_id_jsp_370519651_0pc4:j_id13
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
      
      root cause
      
      java.lang.IllegalStateException: duplicate Id for a component content:j_id_jsp_370519651_0pc4:j_id13
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:50)
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
       org.ajax4jsf.application.TreeStructureNode.apply(TreeStructureNode.java:72)
       org.ajax4jsf.application.AjaxStateManager.getTreeStructureToSave(AjaxStateManager.java:164)
       org.ajax4jsf.application.AjaxStateManager.buildSerializedView(AjaxStateManager.java:271)
       org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:255)
       javax.faces.application.StateManager.saveView(StateManager.java:155)
       com.sun.faces.application.ViewHandlerImpl$WriteBehindStateWriter.flushToWriter(ViewHandlerImpl.java:897)
       com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:184)
       org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
       com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
       org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
       org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)