google-code-export / wiquery

Automatically exported from code.google.com/p/wiquery
MIT License
1 stars 1 forks source link

SortableAjaxBehavior with multiple operations in the same time does not work properly #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. create two connected lists with SortableAjaxBehavior following UPDATE 
notifications only, by using 2 ListView components
2. start dragging 5 elements from the first list to the second list and watch 
the logs for the ajax UPDATE notifications (2 per each moved element and I use 
them to add/remove from the ListView model)

What is the expected output? What do you see instead?

- I expect that all the elements dragged make it successfully to the second list
- Instead, if I remove the element from the first ListView model when receiving 
the notification, the indexes for the other 4 elements remaining to be dragged 
are messed up and either wrong elements are moved or there is an 
IndexOutOfBounds exception if I am playing with the last elements.

Please note that this works fine if I move them one by one, but I need to 
support moving more of them and not blocking the UI for this.

Similar problem with the index occurs when I add (not just remove) 5 new 
elements to the other list in the same time.

Please let me know if there is a nice solution for this other then keeping 
track of dirty information and updating the model lists later.

What version of the product are you using? On what operating system?
<dependency>
        <groupId>org.odlabs.wiquery</groupId>
        <artifactId>wiquery</artifactId>
        <version>1.2.1</version>
</dependency>
OS: Windows 7, Gentoo Linux

Please provide any additional information below.

If I am not using the behavior as I should, please point me to the right 
direction to avoid the above problem.
Thanks!

Original issue reported on code.google.com by cristi...@gmail.com on 21 Mar 2011 at 2:12

GoogleCodeExporter commented 9 years ago
Hi,

Can you submit a sample of your project please to detect where the problem can 
be please ? (an eclipse project, a maven project ...)

Regards

Julien Roche

Original comment by roche....@gmail.com on 26 Mar 2011 at 8:40

GoogleCodeExporter commented 9 years ago
Yes, I will do that. Apologies for the too complex explanations.

Original comment by cristi...@gmail.com on 28 Mar 2011 at 7:31

GoogleCodeExporter commented 9 years ago
Attached is a sample project with this. Just try to move ALL the elements from 
the first list to the second one and you will see the exception. You will 
notice that the indexes are messed up after removing the first element. Similar 
problem occurs for add or when manipulating the model list while using this 
behavior.

Thanks!

Original comment by cristi...@gmail.com on 30 Mar 2011 at 7:53

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks,

I will look on your problem this weekend (I hope).

Regards

Julien Roche

Original comment by roche....@gmail.com on 31 Mar 2011 at 6:39

GoogleCodeExporter commented 9 years ago

Original comment by hielke.hoeve on 11 May 2011 at 7:19

GoogleCodeExporter commented 9 years ago
The issue was either
-not reproducable
-there is a newer version available
-reported in a version which is no longer supported

if the issue is still present in the latest version (6.9+) then please reopen 
the issue with the required information to reproduce the issue.

Original comment by hielke.hoeve on 26 Nov 2013 at 8:37