Hi Kevin,

(BTW, my flexcoders filter looks for various keywords in the subject 
like DataServices, Livecycle, etc. so I missed this one originally)

Are you using paging with your filled collection?   If you are not 
paging, we return the entire collection in one batch.  We do dispatch 
collection events as we are walking through the collection.  The UI 
controls should be watching these events and invalidating their 
display lists as necessary but the revalidation occurs during the 
next enter frame event.   I don't think it is possible for the 
redisplay to occur in the middle of us processing the fill result 
however so it seems like more likely you are paging in values if you 
are seeing visual artifacts as the data comes in.  Turning off paging 
might improve the display but obviously would have other side 
effects.  

If paging is on, we send the collection events as each page comes in 
(replacing NULL with the item for each index in the 
ArrayCollection).  So unfortunately the only way to listen for these 
events is the same way the TileList listens for them.  you could 
always listen for these events and use some trigger as the means to 
set the dataProvider for the TileList.  Or I think I sent you my 
NotPendingCollection.as class which can be used as a means to 
suppress pending errors altogether... putting that between the 
TileList and the ArrayCollection might yield better behavior.  

When you are processing pushed changes from the server, you do have 
more control.  You can turn off autoMerge.  The pushed changes then 
queue up on the client until you call dataStore.merge().  At that 
point all pending changes are applied.  Again, this method should 
invalidate the display list of any UI controls but the actual 
rendering will take place in the next "enter frame" event which 
should occur after all of the merged changes have been applied.  

Jeff 

--- In flexcoders@yahoogroups.com, "Kevin" <[EMAIL PROTECTED]> wrote:
>
> I am getting some odd behavior from the TileList when loading and
> ArrayCollection from the server.  I am not sure if this is an
> actionscript issue OR the way Data Services serializes the 
collections.
> 
> I have bound the DataProvider of my TileList to a paged collection
> that get's automatically lazy loaded from the server.  When the
> collection comes in, you can see the TileList load with double the
> amount of records and then eventually redraw with the correct 
list.  
> 
> 1. Can I listen for the completed load from the server and then draw
> my TileList then?  It seems in efficient (if not dangerous) to keep
> drawing the TileList as the collection update.  I also would want to
> disable the TileList when new loads are getting pushed to the 
client.
> (These seem to be causing redraw issues.)
> 
> 2. Can I monitor the progress of the collection as it fills from the
> server and create a progress monitor.  Presumably we know how many 
we
> are expecting because data services pulls in the id's.  Is there a 
way
> to then monitor the load in realtime.
> 
> OR
> 
> 3. Is this a problem in TileList and how the TileList lays out it's
> children?  Is it best practice to hide the component until all the
> children are laid out to avoid this.
> 
> Thanks for the input on this one.
> 
> - Kevin
>


Reply via email to