If you make a change to the collection property on the client side, we
queue an "update" message for the parent item of that collection.  This
update will send down the entire collection, then push it to other
clients even if you only added or removed one item from the collection.
If your collection property is lazy="true" we only push around the ids
of the elements in the collection.


If you change a property of an item in a collection and that collection
is a managed association, we only send the update for the item in the
collection.  The parent item is not affected.  

 

This does make collection properties somewhat inefficient when dealing
with large collections.  We have an alternative way of doing updates to
collection properties coming out in the next release where we send
around incremental changes. 

 

The ArrayCollection.refresh method is (I think) just about updating the
client side sort and filters.  It won't go back to the server.  You'd
have to call getItem or fill again for the parent item to refresh the
child collection's membership.  To refresh individual items in the
collection you can call getItem on them. 

 

Jeff

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin
Sent: Thursday, January 10, 2008 3:14 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Manual refresh nested collection in LCDS
managed object

 

> Yes, that is in Java. If you are in ActionScript, usually you have the
> collection property on the client already and so just make a change to
> it using the collection apis.

I am curious to how this works internally. If I make a change to a
collection (or an item in the collection) on the actionscript side,
when that change is made on the server does the whole collection get
refreshed OR just the single object that I made the change to.

Also, I am assuming that when I call someArrayCollection.refresh() on
the client that this does NOT signal a refresh of data from the
server. I would have to do something more substantial to actually
signal a reload of the current data from the server (like change some
data)... correct?

I guess I am trying to figure out the expected behavior when trying to
managed objects/collections on the client with autosync vs. manual sync.

- Kevin

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Jeff Vroom" <[EMAIL PROTECTED]> wrote:
>
> Yes, that is in Java. If you are in ActionScript, usually you have the
> collection property on the client already and so just make a change to
> it using the collection apis. When you commit, it should apply those
> changes on the server. 
> 
> 
> 
> I started to answer your next question a few times and each time
> realized my answer would probably get me in trouble with corporate :-)
> 
> 
> 
> Jeff
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Kevin
> Sent: Thursday, January 10, 2008 1:04 PM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Re: Manual refresh nested collection in LCDS
> managed object
> 
> 
> 
> Sounds like this needs to be done in Java correct? Is there a way to
> do a refresh from actionscript?
> 
> Also you have mentioned some new features (destination inheritance!)
> for the next version. Is there a target date for that yet OR info
> anywhere as to what the planned feature are?
> 
> Thanks! - Kevin
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com>
> , "Jeff Vroom" <jvroom@> wrote:
> >
> > You can use the method DataServiceTransaction.updateItem(..) to
update
> > association properties as well. You need to create an instance of
the
> > parent object, fully populate the association property with the new
> > values, then specify the property name (or names) you changed in the
> > "changes" parameter. You can supply null for the previous item of
> > course unless you want to do conflict detection. 
> > 
> > 
> > 
> > We're adding better support for incremental updates of association
> > properties in general in the next version. 
> > 
> > 
> > 
> > Jeff
> > 
> > 
> > 
> > ________________________________
> > 
> > From: flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of Kevin
> > Sent: Thursday, January 10, 2008 10:55 AM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Manual refresh nested collection in LCDS
managed
> > object
> > 
> > 
> > 
> > I am wondering if there is a way to manually refresh a nested
> > collection from the server. If I have an object with nested
> > collections, I know how to refresh the collection holding the parent
> > object, but is there a way to refresh just the object OR just a
> > collection inside the object.
> > 
> > All my collections have association destinations, but the nested
> > collections are filled automatically from the parent object and not
> > from an explicit call that we make so I am not sure how best to
> > refresh them manually if needed.
> > 
> > I assume there is something basic here I am missing.
> > 
> > Thanks,
> > 
> > Kevin
> >
>

 

Reply via email to