6 Replies Latest reply on Jan 29, 2010 1:51 PM by rodriguezrps

    Excel multiple iteration

    jspring

      I have collection objects inside a single parent collection object.  I'm able to perform a nested iteration in JSf to display this data, but I would like to export it to excel.  Is there a way to iterate over multiple (in this case 2) lists using the excel sheet tags?

        • 1. Re: Excel multiple iteration
          nickarls

          Hmm, some sort of




          1
             1.1
             1.2
             1.3
          2
             2.1
             2.2
             2.3
          3
             3.1...





          ?

          • 2. Re: Excel multiple iteration
            jspring
            Yes exactly.

            List rollups (var = "rollup")
                -> List rollup.rollupData (var = "data")
                    -> data.name
                    -> data.date
                       etc.

            • 3. Re: Excel multiple iteration
              nickarls

              Hmm, it was mostly designed for outputting blocks of data but you could try using nested ui:repeat tags and control the row and column attribute values of the cells. If it breaks, you can keep the pieces ;-)

              • 4. Re: Excel multiple iteration
                jspring

                Thanks!


                I was able to change the model to include all items in a single list but will keep the ui:repeat in mind next time.

                • 5. Re: Excel multiple iteration

                  i m facing this problem..i wan display something like this, but the value need to be separated in individual cell. ui:repeat only work inside e:cell tag.






                  1
                     1.1 
                     1.2
                     1.3
                  2
                     2.1
                     2.2
                     2.3
                  3
                     3.1...








                  the code below works in datatable, but how can i display in excel?


                              <h:dataTable id="theDataTable" border="1" value="#{TypeList}" var="key" >  
                  
                                  <h:column>  
                                       <f:facet name="header">  
                                            <h:outputText value="#{key}"/>  
                                       </f:facet>  
                                       <h:dataTable value="#{inventoryMonthList}" var="list" >  
                                            <h:column>  
                                                 <h:dataTable value="#{list[key]}" var="item">  
                                                      <h:column>  
                                                           <h:outputText value="#{item.partNo}"/>  
                                                      </h:column>  
                                                 </h:dataTable>  
                                            </h:column>  
                                       </h:dataTable>  
                                  </h:column>  
                             </h:dataTable>  



                  • 6. Re: Excel multiple iteration
                    rodriguezrps

                    i have the same problem any suggestion?