Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344692 - singleSelectionObservable is not updated in TableRidget
Summary: singleSelectionObservable is not updated in TableRidget
Status: NEW
Alias: None
Product: Riena
Classification: RT
Component: ridget (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-04 07:51 EDT by Stephan Mann CLA
Modified: 2011-06-09 08:24 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Mann CLA 2011-05-04 07:51:33 EDT
In the following use case, an inconsistent state can be produced where the selection observable holds an obsolete object:

1. A table is bound to a model (WriteableList) containing a number of objects
2. One object in this table is selected and an action is executed which accesses this selection (open selected object, for example)
3. Due to some action the objects in the table are reevaluated/reloaded/somehow changed. The WriteableList which is bound to the table ridget is updated and updateFromModel() is called on the table ridget. The table shows the right state of all objects. The selection is still visible.
4. If no new selection event occurs and an action is executed which accesses the selection, the old object from before the alteration of the model will be returned by tableRidget.getSelection().

As far as I understand it, there is an update of the selection state missing during the call of updateFromModel(). The workaround at the moment is to explicitly set the selection to a valid object or to a object not in the tables model thereby removing the selection.