I'd use lists with custom item renderers. Repeaters are killers for perormance 
even when you tell them to cache children ....

C




________________________________
From: valdhor <valdhorli...@embarqmail.com>
To: flexcoders@yahoogroups.com
Sent: Monday, July 20, 2009 9:45:44 PM
Subject: [flexcoders] Re: better option than repeater?

  
I use repeaters quite a lot and like them.

What I do is to create a component (Which sometimes contains other components) 
and the repeat that.

In your situation, I would create a component with all of your check boxes and 
save button. This component would have all of the functionality to display 
which check boxes are selected as well as the save button click handler. It 
would also have a public property that would take a data object. On creation 
complete of this component, it would check the values of the data object and 
set the check boxes appropriately.

Then, I would repeat this component passing in the data objects returned from 
the remote object call...

<mx:Repeater id="myStaff" dataProvider= "{staffArrColl} ">
<custom:CheckBoxCom ponent id="checkBoxs" person="{Person( myStaff.currentI 
tem)}" />
</mx:Repeater>

HTH

Steve

--- In flexcod...@yahoogro ups.com, "postwick" <p...@...> wrote:
>
> I don't like repeaters.  They are too clumsy.  The biggest drawback is an 
> inability to access values after the repeater has finish executing.  It's not 
> the same as, for example, looping over values and generating static HTML 
> using ColdFusion.  I seem to always end up having to navigate up and down 
> through the parents/children of the objects and storing values I need in 
> properties like name, automationName, etc.  This is clumsy and messy.
> 
> As an example, I have a section of my application where I want to list the 
> names of people from a table, and for each person generate a set of 
> checkboxes that designate access to certain areas of the application.  For 
> example: http://www.ubeek. com/images/ staffrepeater. jpg
> 
> That is one main repeater that loops through the staff (records returned from 
> remoteObject) and inside that repeater two other repeaters (also from 
> remoteObjects) that generate the checkboxes.
> 
> I can't simply pass the primary key of the staff for which the Save button 
> was clicked, by putting click="saveClick( {staffRepeater. currentItem. SEQ})" 
> into the button object.  When I do that and click it I get an error about 
> "repeater is not currently executing" or something like that.
> 
> I don't want to resort to a datagrid and then "click to edit" then bring up a 
> form kind of process.  I want it as few clicks as possible.
> 
> Is there a better way to display data in a custom way like this, without 
> using repeaters, so that I can more easily access the child objects and their 
> properties?
> 
> Thanks,
> Paul
>


   


      

Reply via email to