Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [Databinding] How to manipulate record order in a TableViewer
[Databinding] How to manipulate record order in a TableViewer [message #511071] Fri, 29 January 2010 12:06
Gerald Rosenberg is currently offline Gerald RosenbergFriend
Messages: 104
Registered: July 2009
Senior Member
I have a Tableviewer bound to a List using ViewerSupport - that part works fine.

The question is, how to connect up a set of Up/Down/Add/Remove buttons in the view to manipulate
the order of the rows in the table and to add and delete rows, with the result being properly
reflected in the model through the existing bindings.

getTableViewer().getInput() is a BeansObservableListDecorator
getTableViewer().getContentProvider() is a ObservableListContentProvider

Neither appears appropriate for manipulating the view side of the bindings.

Snippet 18 shows the add/remove buttons but connects them to the model directly through its
ListObservables wrapper. Is there an alternative that does not require making the model directly
accessible in the view.

Previous Topic:Getting handle to a file outside eclipse workspace
Next Topic:Core Expression: activeEditor adapts to ITextEditor
Goto Forum:

Current Time: Sat Apr 21 02:28:43 GMT 2018

Powered by FUDForum. Page generated in 0.02861 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software