3 Replies Latest reply on Nov 20, 2007 9:51 AM by inv3r53 d

    Datatable and a:repeat?

    Tomislav Tkal?evi? Novice

      Hy to all!
      I need to do something like variable columns,
      so i have tried on datatable put a:repeat..

      This is my jsp page

      <r:dataTable id="tablica2" var="v" rowKeyVar="rb" value="#{test.data.rows}">
       <f:facet name="header">
       <r:columnGroup id="grupaKolonaZaglavlje">
       <a:repeat value="#{test.data.columns}" var="c">
       <t:outputText value="#{c}"/>
       <a:repeat value="#{v}" var="r">
       <t:outputText value="#{r}" />

      This is class which holds the data

      package orka.core.test;
      import java.util.List;
      import java.util.Vector;
      public class Data {
       private List<String> columns = new Vector<String>();
       private List<String> rows = new Vector<String>();
       public List<String> getColumns() {
       return columns;
       public void setColumns(List<String> columns) {
       this.columns = columns;
       public List<String> getRows() {
       return rows;
       public void setRows(List<String> rows) {
       this.rows = rows;

      And i (in some test bean) load some data in data holder class

      package orka.core.test;
      import org.jboss.seam.annotations.Create;
      import org.jboss.seam.annotations.Name;
      public class TestDatatable{
       Data data = new Data();
       public void create(){
       pp.getRows().add("D.F Kozarac");
       pp.getRows().add("D.F Kozarac 53 a");
       public Data getData() {
       return pp;
       public void setData(Data data) {
       this.data = data;

      The problem is that obviously, a4j:repeat doesn't work in this kinda way.
      The page which is rendered doesn't bring any data