5 Replies Latest reply on Apr 18, 2007 8:09 AM by ilya_shaikovsky

    TabPanel issue

    mylove.168

      I have some issue when using TabPanel.
      The jsp code is:
      <%@ page language="java" pageEncoding="UTF-8"%>
      <%@ 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"%>
      <%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
      <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>

      <%
      String path = request.getContextPath();
      String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path
      + "/";
      %>

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


      <f:view>
      <h:form>
      Here is an example of tab panel switched completely on client.
      <rich:tabPanel switchType="client">
      <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>
      </h:form>
      </f:view>


      but the page shows like this:

      Here is an example of tab panel switched completely on client. Here is tab #1 Here is tab #2 Here is tab #3
      First Second Third

      Could any help? And where can I download the richfaces demo use jsp not xhtml? TIA.

        • 1. Re: TabPanel issue

          JSF 1.1 you use, does not allow to have a pure html (text) context inside the JSF component. This feature is allowed only in JSF 1.2 (jsp or xhtml) or when using Facelets (xhtml).

          Use <h:outputText value="Here is tab #1" />

          • 2. Re: TabPanel issue
            mylove.168

            I just try to use <h:outputText value="Here is tab #1"/>, but there is nothing to display. Btw, is there have richfaces demo use jsp can be download? thanks

            • 3. Re: TabPanel issue

              richfaces-demo uses jsf 1.2+facelets. No other richfaces-demo available. All other demos in the SVN uses JSF 1.1

              • 4. Re: TabPanel issue
                mylove.168

                I downloaded the resource from SVN,but the demo always have some mistake, and I can't find why the tabPanel doesn't shows the content?
                Or it means that richfaces doesn't work well with jsp? I really so puzzled!

                • 5. Re: TabPanel issue
                  ilya_shaikovsky

                  No, in general we have such problems with the JSP pages.

                  Did you use latest version?

                  And specify please your environment and settings.

                  May be some exceptions about resources loading in console?