[flexcoders] Re: LCDS problems using refreshCollection(value:ListCollectionView)
The code is pretty simple. This is all I am trying to do: var ds:DataService = new DataService("myDataService"); ds.addEventListener(ResultEvent.RESULT,handleResult); ds.refreshCollection(myCollection); //myCollecton is managed by the myDataService destination the problem is that the event handler is not firing. I could listen for the CollectionEvent, but I would like to be able to verify the AsyncToken in the result which I can't do when listening for the collection change. I am wondering if anyone has been able to use this feature successfully. Thanks, Kevin --- In flexcoders@yahoogroups.com, "rahul_bindu" wrote: > > Kevin, > This is a quick fix, you could listen to the > CollectionEvent.COLLECTION_CHANGE on the managed collection. If you could > post more code, I would be in a better position to solve the issue. > > Rahul. > --- In flexcoders@yahoogroups.com, Kevin wrote: > > > > Is anyone out there using the feature of LCDS that allows you to > > refresh a managed collection (see below)? I am able to get the > > collection to refresh, but I can't seem to get any of the event > > handlers to fire, thus I can't listen for the result of the fill using > > (myDataService.addEventListener(ResultEvent.RESULT,handleResult). I > > have traced the result in my logs and I know I am attaching the > > listener to the correct dataService. I am wondering if this is a > > known bug or if it's something I am doing wrong. > > > > I am interested if anyone is having the same problem. Thanks, Kevin > > > > /** > > * Refreshes an array collection previously filled with the fill > > method or managed as > > * a managed association. This method makes a request to the > > server, fetches the new > > * version of any resident items in the collection using the fill > > parameters original used > > * with this collection or by fetching the property from the > > parent item. > > * If any changes are found, they merged into the collection in > > an incremental fashion. > > * > > * @return AsyncToken You can use this token to register one or > > more callback > > *functions to receive result or fault events from > > this refresh operation. > > *Null is returned if there is nothing to refresh for > > a paged collection. > > *This token is also returned in the call > code> property of > > *the ResultEvent.RESULT or in the > > *FaultEvent.FAULT. > > *Custom data can be attached to this object and > > inspected later > > *during the event handling phase. > > */ > > public function > > refreshCollection(value:ListCollectionView):AsyncToken > > >
Re: [flexcoders] Re: LCDS problems using refreshCollection(value:ListCollectionView)
this even however fires a lot if you use that collection to manipulate data On Tue, Jun 2, 2009 at 2:38 PM, rahul_bindu wrote: > > > Kevin, > This is a quick fix, you could listen to the > CollectionEvent.COLLECTION_CHANGE on the managed collection. If you could > post more code, I would be in a better position to solve the issue. > > Rahul. > > --- In flexcoders@yahoogroups.com , Kevin > wrote: > > > > Is anyone out there using the feature of LCDS that allows you to > > refresh a managed collection (see below)? I am able to get the > > collection to refresh, but I can't seem to get any of the event > > handlers to fire, thus I can't listen for the result of the fill using > > (myDataService.addEventListener(ResultEvent.RESULT,handleResult). I > > have traced the result in my logs and I know I am attaching the > > listener to the correct dataService. I am wondering if this is a > > known bug or if it's something I am doing wrong. > > > > I am interested if anyone is having the same problem. Thanks, Kevin > > > > /** > > * Refreshes an array collection previously filled with the fill > > method or managed as > > * a managed association. This method makes a request to the > > server, fetches the new > > * version of any resident items in the collection using the fill > > parameters original used > > * with this collection or by fetching the property from the > > parent item. > > * If any changes are found, they merged into the collection in > > an incremental fashion. > > * > > * @return AsyncToken You can use this token to register one or > > more callback > > * functions to receive result or fault events from > > this refresh operation. > > * Null is returned if there is nothing to refresh for > > a paged collection. > > * This token is also returned in the call > code> property of > > * the ResultEvent.RESULT or in the > > * FaultEvent.FAULT. > > * Custom data can be attached to this object and > > inspected later > > * during the event handling phase. > > */ > > public function > > refreshCollection(value:ListCollectionView):AsyncToken > > > > > -- j:pn \\no comment
[flexcoders] Re: LCDS problems using refreshCollection(value:ListCollectionView)
Kevin, This is a quick fix, you could listen to the CollectionEvent.COLLECTION_CHANGE on the managed collection. If you could post more code, I would be in a better position to solve the issue. Rahul. --- In flexcoders@yahoogroups.com, Kevin wrote: > > Is anyone out there using the feature of LCDS that allows you to > refresh a managed collection (see below)? I am able to get the > collection to refresh, but I can't seem to get any of the event > handlers to fire, thus I can't listen for the result of the fill using > (myDataService.addEventListener(ResultEvent.RESULT,handleResult). I > have traced the result in my logs and I know I am attaching the > listener to the correct dataService. I am wondering if this is a > known bug or if it's something I am doing wrong. > > I am interested if anyone is having the same problem. Thanks, Kevin > > /** > * Refreshes an array collection previously filled with the fill > method or managed as > * a managed association. This method makes a request to the > server, fetches the new > * version of any resident items in the collection using the fill > parameters original used > * with this collection or by fetching the property from the > parent item. > * If any changes are found, they merged into the collection in > an incremental fashion. > * > * @return AsyncToken You can use this token to register one or > more callback > *functions to receive result or fault events from > this refresh operation. > *Null is returned if there is nothing to refresh for > a paged collection. > *This token is also returned in the call code> property of > *the ResultEvent.RESULT or in the > *FaultEvent.FAULT. > *Custom data can be attached to this object and > inspected later > *during the event handling phase. > */ > public function > refreshCollection(value:ListCollectionView):AsyncToken >