Yes, manipulate the dataProvider first.  You will have much better
performance for one thing.  Rendering a bunch of unwanted elements is
not a good approach.

 

Also, if you DO still want to do complex work with a repeater, put it in
a component, and repeat that.  Encapsulate the behaviors within the
component. You will find its a much more intuitive way to code.  Pass in
the entire currentItem.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Amy
Sent: Sunday, September 21, 2008 11:10 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: removeChild or delete item in repeater

 

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "urmissinlink" <[EMAIL PROTECTED]> 
wrote:
>
> hey guys,
> I have a nested repeater as seen below
> 
> <mx:Repeater id="_rpModule" dataProvider="{A00Module}" >
> <mx:LinkButton id="_mod" label="{_rpModule.currentItem.label}" 
> click="openModule(event)" icon="@Embed(source='img/Expand.png')"/>

> <mx:VBox paddingLeft="35" id="vform">
> <mx:Repeater id="_rpSubModule" dataProvider="{A00SubModule}" 
> repeatEnd="populateSub(event);">
> <mx:LinkButton id="_submod" 
> label="{_rpSubModule.currentItem.label}"/>
> </mx:Repeater>
> </mx:VBox>
> </mx:Repeater>
> 
> 
> I am running a loop at the RepeatEnd phase to delete the 
linkbuttons 
> that I don't want, but they are not removing from the screen at all.

Why not just filter the dataProvider so as not to add them in the 
first place?

 

Reply via email to