0 Replies Latest reply on Jul 17, 2008 2:26 PM by Kristen McGregor

    rich:DataTable in rich:tabPanel

    Kristen McGregor Newbie

      Hey all,
      I'm using a rich:dataTable within a rich:tabPanel and am getting the following error:

      javax.servlet.ServletException: duplicate Id for a component j_id_jsp_917984629_12:j_id_jsp_917984629_14
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)

      I am using the following markup:
      <!-- Main Tabs -->
      <rich:tabPanel switchType="server" headerClass="tab-header"
       <rich:tab label="Home">
       <rich:dataTable value="#{testBean.results}" var="row"
       style="text-align:left" rows="10">
       <rich:columns value="#{testBean.columnHeaders}" var="columnHeader" >
       <f:facet name="header">
       <h:outputText value="#{columnHeader}" />
       <h:outputText value="#{row[columnHeader]}" />
       <f:facet name="footer">
       <rich:tab label="Program View">

      ... and the following TestBean:
      public class TestBean {
       private List<Map<String,String>> results;
       private List<String> columnHeaders;
       public TestBean()
       columnHeaders = new ArrayList<String>();
       results = new ArrayList<Map<String,String>>();
       Map<String, String> result1 = new HashMap<String, String>();
       result1.put("col1", "col1row1");
       result1.put("col2", "col2row1");
       result1.put("col3", "col3row1");
       Map<String, String> result2 = new HashMap<String, String>();
       result2.put("col1", "col1row2");
       result2.put("col2", "col2row2");
       result2.put("col3", "col3row2");
       Map<String, String> result3 = new HashMap<String, String>();
       result3.put("col1", "col1row3");
       result3.put("col2", "col2row3");
       result3.put("col3", "col3row3");
       public List<Map<String, String>> getResults() {
       return results;
       public List<String> getColumnHeaders() {
       return columnHeaders;

      If I use Tomahawk's dataTable, it works fine. Any ideas why it's not working with RichFaces?
      Thanks for any insight!