3 Replies Latest reply on Feb 13, 2008 1:26 PM by plotkems

    RichTabPanel nesting problem

    plotkems

      I'm getting an HTTP 500 error whenever I try to make even the simplest tabPanel. It tells me the tabs "are not nested within UITabPanel".

      javax.faces.FacesException: The component: _id0:_id2 is not nested within UITabPanel
       org.richfaces.component.UITab.getPane(UITab.java:82)
      


      Here is the code, it's very basic:

      <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
      
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      
      <html>
       <body>
       <rich:tabPanel>
       <rich:tab label="First">
       Here is tab #1
       </rich:tab>
       <rich:tab label="Second">
       Here is tab #2
       </rich:tab>
       <rich:tab label="Third">
       Here is tab #3
       </rich:tab>
       </rich:tabPanel>
       </body>
      </html>
      


      Thank you in advance for any help.

        • 1. Re: RichTabPanel nesting problem
          dkarr

          That's certainly an odd error, but you probably need to nest the tabPanel inside both "<f:view>" and "<a4j:form>". The tabPanel is in the form, which is in the view, which is in the body. The form may not be required for this, but the view probably is.

          • 2. Re: RichTabPanel nesting problem
            ilya_shaikovsky

            form isn't nessesary..
            but add f:view. And use <h:outputText value="Here is tab #1"> instead of plain text.

            • 3. Re: RichTabPanel nesting problem
              plotkems

              It's working now. The <h:outputText> did it. Thank you very much. Oddly enough though, when I reopened the project, the <f:view> tag was there, though I distinctly remember that not being enough to make it work earlier. Oh well. Thank you again for your help.