[
https://issues.apache.org/jira/browse/FLEX-33607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13708346#comment-13708346
]
Maurice Amsellem commented on FLEX-33607:
-----------------------------------------
The real example requires asynchronous calls and a bunch of classes, so I wrote
a simplified example to focus on the pendingResponders "issue".
It involves two classes: AsyncListView and SimplePagedList class that fill the
items in a synchronous fashion and sends the appropriate events to the ALV.
This class is inspired from Jame Ward's PagedList implementation.
The (realistic) scenario is the following:
- requests 5 items through the AsyncListView
- underlying SimplePagedList answers "actually there are only 1 item matching
", so sets its length to 1, fills the items, and dispatches the appropriate
REPLACE and REMOVE events.
I am using AsyncListView.toString() to show the internal state of the list.
Running AsyncListViewTest class with FlexUnit 4, and it will fail with the
following error:
"should have 0 pending items after answer -
expected:<mx.collections::AsyncListView length=1, 0 pending requests> but
was:<mx.collections::AsyncListView length=1, 4 pending requests>"
So what do you think? is that clear enough? or maybe I am not using
AsyncListView the right way?
> AsyncListView does not seem to handle item removal notification properly
> ------------------------------------------------------------------------
>
> Key: FLEX-33607
> URL: https://issues.apache.org/jira/browse/FLEX-33607
> Project: Apache Flex
> Issue Type: Bug
> Components: ASyncListView
> Affects Versions: Apache Flex 4.9.0
> Reporter: Maurice Amsellem
> Attachments: AsyncListViewTest.as, SimplePagedList.as
>
>
> When notifying an AsyncListView that items have been removed, the
> itemResponders matching the items to the right of the removal are shifted to
> the left, which is correct, but the itemResponders for the removed items
> themselves are not removed.
> {code}
> mx.collections.AsyncListView.as
> private function handleCollectionChangeEvent(ce:CollectionEvent):void
> {
> ...
> switch (ce.kind)
> {
> ...
> case CollectionEventKind.REMOVE:
> shiftPendingRespondersLeft(ce);
> break;
> {code}
> One of the consequences is that if you truncate the client list (ie remove N
> items at the end) and send a remove notification, the pending responders are
> not removed
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira