0 Replies Latest reply on Jun 18, 2010 8:16 AM by bqiu

    Hyperlink nested within columns (for iteration) not working.

    bqiu

      We had a request to generate hyper link for one of the column in the excel spreadsheet generated by the Seam Excel. But the test did not go well, here is my experiment by changing Seam Excel example people.xhtml, to add hyperlink to the last column. But the result is only the first row has the link, all other rows on that column are all empty.


      I see the e:hyperlink tag have an attribute called startRow, but the question is how to get the row number information during the iteration?


      If anyone knows how to resolve the issue, could you give me help?


      <html xmlns="http://www.w3.org/1999/xhtml"
              xmlns:ui="http://java.sun.com/jsf/facelets"
              xmlns:e="http://jboss.com/products/seam/excel"
              xmlns:f="http://java.sun.com/jsf/core">
      
      <e:workbook type="#{exportType}">
              <e:worksheet name="People" value="#{people}" var="person">
                      <e:header>
                              <f:facet name="left">
                                      The date is #date# and the time is #time#
                              </f:facet>
                      </e:header>
                      <e:column style="xls-column-autosize: true">
                              <f:facet name="header">
                                      <e:cell value="Name" style="xls-font: red bold 10 Verdana"/>
                              </f:facet>
                              <e:cell value="#{person.name}" forceType="text" />
                      </e:column>
                      <e:column style="xls-column-autosize: true">
                              <f:facet name="header">
                                      <e:cell value="Company" style="xls-font: red bold 10 Verdana"/>
                              </f:facet>
                              <e:cell value="#{person.company}" />
                      </e:column>
                      <e:column style="xls-column-autosize: true">
                              <f:facet name="header">
                                      <e:cell value="Working on" style="xls-font: red bold 10 Verdana"/>
                              </f:facet>
                              <e:hyperlink URL="http://seamframework.org"
                                      description="Test" />
                      </e:column>
              </e:worksheet>
      </e:workbook>
      </html>