I'm jumping late here, but are you not using a List class and custom
item renderers?

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of donvoltz
Sent: Sunday, September 16, 2007 1:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Best Method for Dynamic Custom Components

 

Hi Ben,

Thank you for your response on this question.

I am starting to think I am going about this all wrong. What I am
trying to do is dynamically add and remove a group of custom
components to my application.

I am sending 2 HttpRequests, one returns a list of locations that need
to be filled by people on a given date, the second returns a list of
people who are assigned to each of these locations on the same date
(if any are assigned at all).

With the first list, the locations, I want to add a custom component
for each location (this is what I am doing when I instantiate my
callLabel component. Then after I call the schedule HttpRequest, I
need to add a person for each location if there is a person scheduled.
If none is scheduled, an input field remains blank and would be filled
by adding in a person.

The reason I am building an arrayCollection of my custom component is
to be able to add the names of the people when my second database call
is made. I understand that each component should have a unique id so
that it can be referenced and modified at a later time. What is the
best way to do this when you are adding a number of components like I
am doing? The only way I have to reference these is by a location_id
which I have in my database and is unique between tables.

I was attempting to build an array of components that uses this
location_id as the components unique identifier so that when I
received more information, I could update the component properties or
call its methods.

Things get a tad more complex, when a user chooses another date, I
need to destroy these components and add a new set of locations and
people for the newly selected day.

I am hoping this helps to clear up what I am doing and if you are
willing to help with this situation

Thanks

DOn

 

Reply via email to