AnsweredAssumed Answered

ERROR : Client-id : _idJsp30 is duplicated in the faces tree

Question asked by txakin on Dec 3, 2008
Latest reply on Dec 3, 2008 by txakin
Hola a todos,

Estoy modificando un poco el browse.jsp, y sobre todo con mucho cuidado (que miedo!!!!!!!!  :shock: )

Me estoy encontrando con un error tal como :

javax.faces.FacesException: Client-id : _idJsp30 is duplicated in the faces tree. Component : browse:_idJsp30, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: content-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: contentRichList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col12][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp30]}
caused by:
org.apache.jasper.JasperException: Client-id : _idJsp30 is duplicated in the faces tree. Component : browse:_idJsp30, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: content-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: contentRichList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col12][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp30]}
caused by:
java.lang.IllegalStateException: Client-id : _idJsp30 is duplicated in the faces tree. Component : browse:_idJsp30, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: content-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: contentRichList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col12][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp30]}


Aquí os envío un trozo de código de lo que he añadido en el browse.jsp (sólo estoy añadiendo cosas poco a poco) en negrita

<%– separator row with gradient shadow –%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width=4 height=9></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width=4 height=9></td>
</tr>

<%– Buscador –%>
<c:set value="${NavigationBean.currentNode.type}" var="tipoExp"/>
<c:if test="${tipoExp == '{es.xxxx.yyyyyy.zzzzzz.pruebas}miprueba'}">
   <tr valign=top>
      <td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td>
      <td style="padding: 4px">
         <a:panel id="buscador-content-panel-prueba" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted"
            titleBgcolor="white" styleClass="mainSubTitle" label="#{msg.search}" progressive="true"
            expanded='#{BrowseBean.panels["buscador-content-panel-prueba"]}'expandedActionListener="#{BrowseBean.expandPanel}">
            <f:subview id="subBuscadorTrasp">
               <%@    include file="/jsp/extension/xxxxxxxx/yyyyyyy/buscar_prueba.jsp" %>
            </f:subview>
         </a:panel>
      </td>
      <td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width=4></td>
   </tr>
</c:if>

<%– Custom Template View –%>
<a:panel id="custom-wrapper-panel" rendered="#{NavigationBean.hasCustomView && NavigationBean.searchContext == null}">
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td>
<td style="padding:4px">
<a:panel id="custom-panel" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" styleClass="mainSubTitle"
label="#{msg.custom_view}" progressive="true"
expanded='#{BrowseBean.panels["custom-panel"]}' expandedActionListener="#{BrowseBean.expandPanel}">
<r:webScript id="webscript" scriptUrl="#{NavigationBean.currentNodeWebscript}" context="#{NavigationBean.currentNode.nodeRef}" rendered="#{NavigationBean.hasWebscriptView}" />
<r:template id="template" template="#{NavigationBean.currentNodeTemplate}" model="#{NavigationBean.templateModel}" rendered="#{!NavigationBean.hasWebscriptView && NavigationBean.hasTemplateView}" />
</a:panel>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width=4></td>
</tr>
</a:panel>


Y el código de buscar_prueba.jsp que estoy intentando incluir es la siguiente :

<%@page import="org.alfresco.web.ui.common.PanelGenerator"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>

<%@ page buffer="100kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>

   <table cellpadding="3" cellspacing="2" border="0" width="100%">
      <tr>
         <td colspan="3" class="wizardSectionHeading">
            <h:outputText value="#{msg.title_space_details}"/>
         </td>
      </tr>
      <tr>
         <td>

            <h:outputText value="Texto:" />
         </td>
         <td>         

               <h:inputText id="idTexto" value="#{SearchPruebasBean.texto}" />            
         </td>
      </tr>
      
      <tr>
         <td>

            <h:outputText value="Campo1:" />
         </td>
         <td width="85%">

            <h:selectOneMenu id="campo1" value ="#{SearchPruebasBean.campo1}" 
                         immediate="true" required="false">
               <f:selectItems value="#{SearchPruebasBean.listCampo1}"/>
            </h:selectOneMenu>
         </td>
      </tr>
      <tr>
         <td>

            <h:outputText value="Campo2:"/>
         </td>
         <td>

            <h:selectOneMenu id="campo2" value ="#{SearchPruebasBean.campo2}" 
                         immediate="true" required="false">
               <f:selectItems value="#{SearchPruebasBean.listCampo2}"/>
            </h:selectOneMenu>
         </td>
      </tr>
      <tr>
         <td>

            <h:outputText value="Campo3:" />
         </td>
         <td width="85%">

            <h:selectOneMenu id="campo3" value ="#{SearchPruebasBean.campo3}" 
                         immediate="true" required="false">
               <f:selectItems value="#{SearchPruebasBean.listCampo3}"/>
            </h:selectOneMenu>
         </td>
      </tr>
      <tr>
         <td width="10%">
            <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %>
            <table cellpadding="1" cellspacing="1" border="0" width="100%">
            <tr>
            <td align="center">
               <h:commandButton id="cmbBuscarPrueba" value="#{msg.search}" action="#{SearchPruebasBean.search}" />
            </td>
            </tr>
            <tr>
            <td align="center">
               <h:commandButton id="cmbResetPrueba" value="#{msg.resetall}" action="#{SearchPruebasBean.resetBuscador}"
                            rendered="#{NavigationBean.searchContext != null}"/>                     
            </td>
            </tr>
            </table>
            <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %>
         </td>
      </tr>
</table>

Alguien me puede decir que debo corregir, porque me estoy volviendo loco por el tema de los "ID"

Muchas gracias y un fuerte abrazo

:)

Outcomes