2 Replies Latest reply on Jan 13, 2008 1:01 PM by David M. Karr

    tabpanel thinks two tabs have the same name

    David M. Karr Newbie

      JSF 1.1, RichFaces 3.1.3.

      Before I file a bug report on this, I'll post this here in case I'm doing something obviously wrong.

      I have a simple tabpanel with skeleton code in each tab. Each tab has a "name" attribute with a different value. When I try to render it, I get this exception:

      javax.faces.FacesException: tabs with the same name not allowed
       at org.richfaces.renderkit.TabPanelRendererBase.encodeTabs(TabPanelRendererBase.java:328)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeBegin(TabPanelRenderer.java:227)
       at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeBegin(TabPanelRenderer.java:180)
       at org.ajax4jsf.renderkit.RendererBase.encodeBegin(RendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
       at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)
       at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:543)

      I stepped through this code in the debugger. My example has three tabs, with the names "obligor", "property", and "ratings". When it stepped through them, it saw the first one as "obligor", the second one as "property", and the third one as "property" (not "ratings").

      Here's my page in its current state:
      <%@ 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"%>
      <title>TabPanel Experiment</title>
       <rich:tabPanel id="tabpanel" switchType="client">
       <rich:tab name="obligor" label="Obligor">
       <h:panelGrid columns="2" id="obligorFields">
       <h:inputText id="field1"/>
       <rich:tab name="property" label="Property">
       <h:panelGrid columns="2" id="propertyFields">
       <h:inputText id="field2"/>
       <rich:tab name="ratings" label="Ratings">
       <h:panelGrid columns="2" id="ratingsFields">
       <h:inputText id="field3"/>