Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346222 - [Table] Selection does not shift after adding items
Summary: [Table] Selection does not shift after adding items
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 RC2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-18 07:53 EDT by Tim Buschtoens CLA
Modified: 2011-05-19 04:28 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (3.09 KB, patch)
2011-05-18 09:19 EDT, Ivan Furnadjiev CLA
tbuschto: review+
tbuschto: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Buschtoens CLA 2011-05-18 07:53:28 EDT
When adding an item to a table, all selections after this item will not shift, i.e. stay on the same row, thereby changing the selected item. For example:

First we have 5 items, the 4th "D" is selected: 

A, B, C, [D], E

Then we add another item "X" as the second item without changing anything else. 

The result is:

A, X, B, [C], D, E

But should be:

A, X, B, C, [D], E
Comment 1 Tim Buschtoens CLA 2011-05-18 07:55:36 EDT
Note: The Tree/Table merge (Bug 332524) will solve this issue automatically, but it will not be part of the 1.4 release.
Comment 2 Ivan Furnadjiev CLA 2011-05-18 09:19:53 EDT
Created attachment 195971 [details]
Proposed patch

The selection indices were not adjusted on the client in case of adding a new item. JS tests added.
I think this fix should go in RC2 as with 1.5 we will have a new tree/table client side implementation.
Comment 3 Tim Buschtoens CLA 2011-05-18 09:24:28 EDT
Comment on attachment 195971 [details]
Proposed patch

Good, fix is solid.
Comment 4 Ivan Furnadjiev CLA 2011-05-19 04:28:35 EDT
Applied patch to CVS HEAD and v14_Maintenance.