0 Replies Latest reply on Oct 18, 2007 10:50 PM by Marcel Mesa

    a4j:Include doesn't work

    Marcel Mesa Newbie

      This is a jsp page I've built:

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>





      <f:view>
      <h:outputText value="Cabeceera" />

      <h:panelGroup id="panel">
      <a4j:include id="enviar" viewId="/page/c.jsp" />
      </h:panelGroup>

      <h:outputText value="header" />
      <h:form>
      <a4j:commandButton action="next" value="fdgdf"></a4j:commandButton>
      </h:form>
      </f:view>



      and the corresponding navegation rules:

      <navigation-rule>
      <from-view-id>/base.jsp</from-view-id>
      <navigation-case>
      <from-outcome>next</from-outcome>
      <to-view-id>/page/b.jsp</to-view-id>
      </navigation-case>
      </navigation-rule>
      <navigation-rule>
      <from-view-id>/page/c.jsp</from-view-id>
      <navigation-case>
      <from-outcome>next</from-outcome>
      <to-view-id>/page/b.jsp</to-view-id>
      </navigation-case>
      </navigation-rule>
      </faces-config>

      I also have this other jsp:

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j" %>
      estoy en c

      <h:form>
      <a4j:region id="re">
      <a4j:commandButton id="b" value="Ir a c" action="next" reRender="panel"></a4j:commandButton>
      </a4j:region>
      </h:form>



      I'm trying to use the a4j:include component to include the second page in the first and it triggers an error, I don't know what it means I wonder si someone can help.
      Note that in the first page I can navigate sucessfully via the second button, which does not use the a4j:include component.

      The exception trace is this:

      org.apache.jasper.JasperException
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)


      causa raíz

      java.lang.NullPointerException
      javax.faces.component.UIComponentBase$ChildrenList.remove(UIComponentBase.java:1545)
      javax.faces.webapp.UIComponentTag.removeOldChildren(UIComponentTag.java:1197)
      javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:535)
      org.ajax4jsf.taglib.html.jsp.IncludeTag.doEndTag(IncludeTag.java:174)
      org.apache.jsp.base_jsp._jspx_meth_a4j_include_0(base_jsp.java:200)
      org.apache.jsp.base_jsp._jspx_meth_h_panelGroup_0(base_jsp.java:176)
      org.apache.jsp.base_jsp._jspx_meth_f_view_0(base_jsp.java:116)
      org.apache.jsp.base_jsp._jspService(base_jsp.java:76)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
      com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)


      I'm using JSF 1.1 with RichFaces 3.1.0