0 Replies Latest reply on Apr 17, 2008 8:39 AM by Andreina T

    modalPanel

    Andreina T Newbie

      Hi, I'm using richfaces 3.1 with myfaces 1.1.3 and i'm trying to use the modalPanel like a wizard, when i run the application everything work fine... the problem is when I try to click the button inside the modalPanel and i get the following mistake:

      Estado HTTP 500 -
      
      --------------------------------------------------------------------------------
      
      type Informe de Excepción
      
      mensaje
      
      descripción El servidor encontró un error interno () que hizo que no pudiera rellenar este requerimiento.
      
      excepción
      
      javax.servlet.ServletException: duplicate Id for a component body:viewDocument:_idJsp143
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       pwc.portal.webapp.filter.KeywordResponseFilter.doFilter(KeywordResponseFilter.java:52)
       org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
       org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
      
      
      causa raÃÂz
      
      javax.faces.FacesException: duplicate Id for a component body:viewDocument:_idJsp143
       org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:435)
       org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)
       org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
       org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       pwc.portal.webapp.filter.KeywordResponseFilter.doFilter(KeywordResponseFilter.java:52)
       org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
       org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
      
      
      causa raÃÂz
      
      java.lang.IllegalStateException: duplicate Id for a component body:viewDocument:_idJsp143
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:326)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager$TreeStrutureNode.apply(AjaxStateManager.java:348)
       org.ajax4jsf.application.AjaxStateManager.saveSerializedView(AjaxStateManager.java:236)
       org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:122)
       org.apache.jsp.WEB_002dINF.templates.template_002d3col_jsp._jspx_meth_f_005fview_005f0(template_002d3col_jsp.java:134)
       org.apache.jsp.WEB_002dINF.templates.template_002d3col_jsp._jspService(template_002d3col_jsp.java:90)
       org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
       org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
       org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
       org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:233)
       org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:219)
       org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
       org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       pwc.portal.webapp.filter.KeywordResponseFilter.doFilter(KeywordResponseFilter.java:52)
       org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
       org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
       org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
      
      


      this is the code of the page with the modalPanel

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      
      
      
      
      
      
      <rich:modalPanel id="panel" width="400" height="300">
       <f:facet name="header">
       <h:outputText value="Modal Panel"/>
       </f:facet>
       <f:facet name="controls">
       <h:form>
       <f:verbatim>
       <a href="javascript:Richfaces.hideModalPanel('panel')">Algo</a>
       </f:verbatim>
       </h:form>
       </f:facet>
       <a4j:outputPanel id="view" >
       <a4j:include viewId="/test.jsp"></a4j:include>
       </a4j:outputPanel>
       </rich:modalPanel>
       <f:verbatim>
       <a href="javascript:Richfaces.showModalPanel('panel')">Algo</a>
       </f:verbatim>
      
      
      
      
      
      <h:form id="Documentument">
       <t:htmlTag value="h2">
       <t:outputText value="#{Form.document.title} / " />
       <t:commandLink value="#{Form.document.document.title}"
       action="#{Form.view}" style="text-decoration: underline;">
       <f:param value="#{Form.document.document.entID}"
       name="entID" />
       </t:commandLink>
       </t:htmlTag>
       <t:htmlTag value="div" styleClass="box-content">
      document.text}" escape="false"
       rendered="#{Form.document.entID != null and entForm.document.text ne ''}" />
      
      
      
       <h:outputText value=" " escape="false" />
      
      
       <h:outputText value="#{document_cont}" />
       <t:saveState value="#{Form.document.cont}" />
       <t:dataList var="content" value="#{Form.document.cont}">
       <t:htmlTag value="h3">
       <h:commandLink value="#{content.title}"
       action="#{entForm.view}">
       <f:param value="#{ent.contID}" name="entID" />
       </h:commandLink>
       </t:htmlTag>
       </t:dataList>
       </t:htmlTag>
      
      </h:form>
      
      

      this is part of my faces-config
      
       <navigation-rule>
       <from-view-id>/test.jsp</from-view-id>
       <navigation-case>
       <from-outcome>included2</from-outcome>
       <to-view-id>/test2.jsp</to-view-id>
       </navigation-case>
      </navigation-rule>
      
      


      test1.jsp

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      
      <h:form>
      <h:outputText value="Go to the step 2"/>
      <a4j:commandButton value="next" action="included2" reRender="view"/>
      </h:form>
      



      test2.jsp
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      
      <h:form id="otro">
      <h:outputText value="Close window"/>
      <h:commandButton type="button" value="Close" onclick="javascript:Richfaces.hideModalPanel('panel')"/>
      </h:form>
      


      Does anybody have an idea of what could be wrong?????

      Thanks in advanced