FYI: if an ArrayCollection is managed by a DataService, then the list property of the ArrayCollection is of type mx.data.DataList. This DataList holds a localItems Array which seems to track the references to the items available in this list. As the items are [Managed] (implement mx.data.DataService) they all have an uid property which is a String representation of the ID I need.
 
So it really seems as if it's enough to drill down to the localItems Array and look for the UID in question.
 
Dirk.


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Eismann
Sent: Monday, August 28, 2006 8:31 AM
To: [email protected]
Subject: RE: [flexcoders] FDMS: check, if an item exists on the client?

Hi Jimmy,
 
I don't think there's a getItem() method on ArrayCollection. There's only getItemAt() but that's useless as I don't have the index of the item.
 
Actually, all I know about the item is the unique ID (i.e. the PK from the DB table) so what I need is something like
 
  myArrayCollection.getItemByUID(uid);
 
where uid is an Object containing the unique ID, e.g.
 
  var uid:Object = {organization_id: 123};
 
Makes sense?
 
So far I have found no way to query a DataStore/Arraycollection/DataList/whatever for an item by passing in the unique ID withouth going to FDMS if the item is already living on the client.
 
Dirk.
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to