2 Replies Latest reply on Apr 19, 2010 8:33 AM by hanshans

    scrollableDataTable in scrollableDataTable

    hanshans

      Hi everyone,

       

      I'm trying to generate following table structure:

       

       __________________________________
            |        |______D___________
         A  |____B___|______E___________
            |    C   |______F___________
      ______|________|______G___________ 

       

      With

      • A.sublist gives B,C
      • B.sublist gives D,E

       

      One way to achieve that is a rich:datatable within another rich:datatable:

       

      <rich:dataTable value="#{bean.result}" var="list">
          <rich:column>
              <h:outputText value="#{list.id}"></h:outputText>
          </rich:column>
          <rich:column>
              <rich:dataTable value="#{list.sublist}" var="sublist">
                  <rich:column>
                      <h:outputText value="#{sublist.id}"></h:outputText>
                  </rich:column>
              </rich:dataTable>
          </rich:column>
      </rich:dataTable>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

      Which works but does not give me the possibility to enable single-/multiple row selection.

      Therefore I would like to embed one rich:scrollableDataTable into another just like in the above example.

      Unfortunatly that does not work.

      The inner table is not displayed.

       

      Any suggestions?

       

      Thanks,

      Alex

       

        • 1. Re: scrollableDataTable in scrollableDataTable
          ilya_shaikovsky

          Such combination was not covered by our internal tests. And I'm not sure that scrollable tables with ajax scrolling mechanisms will works find nested one into another.. Maybe try with ExtendedDataTable?

          • 2. Re: scrollableDataTable in scrollableDataTable
            hanshans

            I dont think  ExtendedDataTable will work since it is even more complex.

            But actually this would be my prefered component to use, since its extensively configurability.

             

            I could not try it with ExtendedDataTable, since I am  even unable to get very minimalistic sample table to work.

             

            <rich:extendedDataTable value="#{bean.result}" var="v">
                <rich:column>
                    <f:facet name="header">
                        <h:outputText value="header"></h:outputText>
                    </f:facet>
                    <h:outputText value="#{v.id}"></h:outputText>
                 </rich:column>
            </rich:extendedDataTable>
                                                                                                                                                                                                                                                                                                                                                                    

            Firebug gives my two error messages:

            • elt is null
              elt.markers = {};
            • $(this.id) is null
              if(!window.ExtendedDataTable)window.Ex...s.sortFct=this.options.sortFunction;}