0 Replies Latest reply on Sep 17, 2010 2:58 AM by EricJ32

    HierarchicalCollectionView and Repeater in Flex 4?

    EricJ32 Level 1

      Hi,

       

      I've been struggling to get a Repeater binding to a HierarchicalCollectionView in Flex 4.

       

      <fx:Declarations>

           <mx:HierarchicalCollectionView id="hcProducts"
                                             source="{groupedProducts}" />
             
              <mx:GroupingCollection2 id="groupedProducts"
                                      source="{model.products}">
                  <mx:Grouping>
                      <mx:fields>
                          <mx:GroupingField name="section" />
                          <mx:GroupingField name="group"  />
                          <mx:GroupingField name="category"  />
                      </mx:fields>
                  </mx:Grouping>
              </mx:GroupingCollection2>
          </fx:Declarations>

       

      <mx:VBox width="100%"> <!-- because repeaters must be inside a Halo component -->

      <mx:Repeater id="rpt" dataProvider="{hcProducts}">

           <mx:Label text="{rpt.currentItem.GroupLabel}" />

      </mx:Repeater>

      </mx:VBox>

       

      This doesn't work. The repeater has no children. However, if I change from using a GroupingCollection2 to the deprecated GroupingCollection, it works fine.

       

      Is this a bug?

       

      Thanks.