4 Replies Latest reply on Sep 18, 2012 9:49 AM by Martin Kouba

    Jboss seam excel and iteration

    Fabien Roussel Newbie

      Hello everyone,

       

      I'm using seam-excel 2.2.0.GA and i'm trying to do something simple like that :

      ex1.png

       

      It's just an iteration over an object list. Data1 is the first element of this list, Data2 the second, and so on.

      Each cells display a field of my bean and I do not want any data in the empty ones (A3, B3, A4, ...).

       

      Here is what my xhtml file looks like :

       

          <e:worksheet value="#{someBean.someList}" var="element" name="worksheet1">
      
            <e:column style="xls-column-autosize: true;">
              <f:facet name="header">
                <e:cell value="Title1" style="xls-font-size: 11; xls-font-bold: true;" />
              </f:facet>
              <e:cell value="#{element.field1}" />
              <e:cell value="" />
              <e:cell value="" />
              <e:cell value="" />
            </e:column>
      
            <e:column style="xls-column-autosize: true;">
              <f:facet name="header">
                <e:cell value="Title2" style="xls-font-size: 11; xls-font-bold: true;" />
              </f:facet>
              <e:cell value="#{element.field2}" />
              <e:cell value="" />
              <e:cell value="" />
              <e:cell value="" />
            </e:column>
      
            <e:column style="xls-column-autosize: true;">
              <f:facet name="header">
                <e:cell value="Title3" style="xls-font-size: 11; xls-font-bold: true;" />
              </f:facet>
              <e:cell value="#{element.field3}" />
              <e:cell value="#{element.field4}" />
              <e:cell value="#{element.field5}" />
              <e:cell value="#{element.field6}" />
            </e:column>
      
            <e:column style="xls-column-autosize: true;">
              <f:facet name="header">
                <e:cell value="Title4" style="xls-font-size: 11; xls-font-bold: true;" />
              </f:facet>
              <e:cell value="#{element.field7}" />
              <e:cell value="#{element.field8}" />
              <e:cell value="#{element.field9}" />
              <e:cell value="#{element.field10}" />
            </e:column>
      
          </e:worksheet>
      

       

      No matter what i try i can't get this work.

       

      Could someone help me on this ?

       

      Thanks.