3 Replies Latest reply on Jun 18, 2010 11:09 AM by krikor paol

    RichFaces tab panel

    krikor paol Newbie

       

       

      I know that, I seen it on richfaces demo.But how can i link each tab to a src?

       

      that is on each tab..it opens a certain source file..how can i do that? thank you    

        • 1. Re: RichFaces tab panel
          Ilya Shaikovsky Master

          just use ui:include or a4j:include inside the tab.

          • 2. Re: RichFaces tab panel
            krikor paol Newbie

             

             

             

            done that, I get this error

             

             

            JBoss Web/3.0.0-beta-2 - Error report org.apache.jasper.JasperException: java.lang.NullPointerException      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:480)      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)      javax.servlet.http.HttpServlet.service(HttpServlet.java:847)      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:542)      com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:355)      com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:130)      com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:170)      com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)      javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) root cause java.lang.NullPointerException      javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1691)      javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:403)      javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2439)      javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:2411)      javax.faces.webapp.UIComponentClassicTagBase.doAfterBody(UIComponentClassicTagBase.java:1432)      org.apache.jsp.MainPage_jsp._jspx_meth_rich_005ftab_005f1(MainPage_jsp.java:257)      org.apache.jsp.MainPage_jsp._jspx_meth_rich_005ftabPanel_005f0(MainPage_jsp.java:166)      org.apache.jsp.MainPage_jsp._jspx_meth_f_005fview_005f0(MainPage_jsp.java:120)      org.apache.jsp.MainPage_jsp._jspService(MainPage_jsp.java:84)      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)      javax.servlet.http.HttpServlet.service(HttpServlet.java:847)      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)      javax.servlet.http.HttpServlet.service(HttpServlet.java:847)      com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:542)      com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:355)      com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:130)      com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:170)      com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)      javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495) note The full stack trace of the root cause is available in the  JBoss Web/3.0.0-beta-2 logs.
            • 3. Re: RichFaces tab panel
              krikor paol Newbie
              <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
              <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
              <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
              <!-- RichFaces tag library declaration -->
              <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
              <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
              
              <html>
              <head>
              <script>
              function send(id)
              {
                  alert(id);
                  return true;
              }
              </script>
              
              </head>
              <f:view>
              
                 <rich:tabPanel switchType="client">
                      <rich:tab  id="tab1" label="First">
                          Here is tab #1
                      </rich:tab>
                      <rich:tab id="tab2" label="Second">
                       <a4j:include viewId="/jsp/event/Events.jsf" />
                      </rich:tab>
                      <rich:tab id="tab3" label="Third">
                          Here is tab #3
                      </rich:tab>
                  </rich:tabPanel>
              
                  </f:view>
                  </html>