14 Replies Latest reply on Apr 30, 2009 2:00 AM by Ruben Jorge

    Problem with <rich:columnGroup> output

    Ruben Jorge Newbie

      Hello everyone,

      I'm new to JSF and RichFaces (just had another question answered, thank you!) and I'm trying to use <rich:dataTable> and <rich:columnGroup> to create nested headers that change dynamically. In order to do this, I have a managed bean with an ArrayList, whose elements will be the headers to display.

      At the moment I'm only trying to display simple headers using these components (not nested). Right now, my .jsp source code is as follows:

      <%@ 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"%>
       <meta http-equiv="Content-Type"
       content="text/html; charset=windows-1252"/>
       <rich:dataTable id="taskList" value="#{TaskListBean.headerList}" var="dataItem">
       <f:facet name="header">
       <% //<rich:column> %>
       <a4j:repeat value="#{TaskListBean.headerList}" var="dataHeader">
       <rich:column style="text-align:center">
       <h:outputText value="#{dataHeader.headerName}"/>
       <% //</rich:column> %>
       <h:commandButton value="New data" action="#{TaskListBean.changeValues}"/>

      When I deploy and run this page, the datatable doesn't show, however, if I uncomment that additional <rich:column>, the table displays all the headers in the datastructure but has an initial blank column that I need to avoid.

      Any ideas on why this is happening or any workarounds?

      Thanks in advance,