MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-1068

GroupBy not honoring table boundaries where table within table

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.6
    • Fix Version/s: None
    • Component/s: Extended Datatable
    • Labels:
      None

      Description

      In the following example:
      fund 1 has member 1 who has 10 assets that have category 'abc' and 05 assets that have category 'xyz'- groupBy groups first 10 entries under 'abc' and next 5 under 'xyz'

      fund 2 has member 1 who has 05 assets that have category 'abc' and 10 assets that have category 'xyz' - groupBy groups first 10 entries under 'abc' and next 5 under 'xyz'

      fund 2 has member 2 who has 2 assets that have category 'abc' and 20 assets that have category 'xyz' - groupBy groups first 10
      entries under 'abc' and next 5 under 'xyz'

      it appears that the groupby is calculating the number of rows that have category 'abc' for the first table instance and then using it for every instance of table assets rather than recalculating for each instance

      <t:dataTable value="#

      {fund}

      " var="funds" >
      <t:column >
      <t:dataTable value="#

      {fund.members}

      " var="members" >
      <t:column >
      <h:outputText value="#

      {members.memberName}

      " />
      </t:column>
      <t:column>
      <t:dataTable value="#

      {members.assets}

      " var="assets">
      <t:column groupBy="true">
      <h:outputText value="#

      {assets.assetCategory}

      " />
      </t:column>
      <t:column >
      <h:outputText value="#

      {assets.description}

      " />
      </t:column>
      </t:dataTable>
      </t:column>
      </t:dataTable>
      </t:column>
      </t:dataTable>

        Activity

        peter hunt made changes -
        Field Original Value New Value
        Description In the following example:
        fund 1
        has 1 members who has 10 assets that have category 'abc' - groupBy works correctly

        member 2 has 5 assets that have category 'abc'
        member 1 will
        <t:dataTable value="#{fund}" var="funds" >
        <t:column >
        <t:dataTable value="#{fund.members}" var="members" >
           <t:column >
               <h:outputText value="#{members.memberName}" />
           </t:column>
           <t:column>
              <t:dataTable value="#{members.assets}" var="assets">
                 <t:column groupBy="true">
                    <h:outputText value="#{assets.assetCategory} " />
                 </t:column>
                 <t:column >
                    <h:outputText value="#{assets.description} " />
                 </t:column>
              </t:dataTable>
           </t:column>
        </t:dataTable>
        </t:column>
        </t:dataTable>
        In the following example:
        fund 1 has member 1 who has 10 assets that have category 'abc' and 05 assets that have category 'xyz'- groupBy groups first 10 entries under 'abc' and next 5 under 'xyz'

        fund 2 has member 1 who has 05 assets that have category 'abc' and 10 assets that have category 'xyz' - groupBy groups first 10 entries under 'abc' and next 5 under 'xyz'

        fund 2 has member 2 who has 2 assets that have category 'abc' and 20 assets that have category 'xyz' - groupBy groups first 10
        entries under 'abc' and next 5 under 'xyz'

        it appears that the groupby is calculating the number of rows that have category 'abc' for the first table instance and then using it for every instance of table assets rather than recalculating for each instance

        <t:dataTable value="#{fund}" var="funds" >
        <t:column >
        <t:dataTable value="#{fund.members}" var="members" >
           <t:column >
               <h:outputText value="#{members.memberName}" />
           </t:column>
           <t:column>
              <t:dataTable value="#{members.assets}" var="assets">
                 <t:column groupBy="true">
                    <h:outputText value="#{assets.assetCategory} " />
                 </t:column>
                 <t:column >
                    <h:outputText value="#{assets.description} " />
                 </t:column>
              </t:dataTable>
           </t:column>
        </t:dataTable>
        </t:column>
        </t:dataTable>
        peter hunt created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            peter hunt
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development