|[Databinding] How to manipulate record order in a TableViewer [message #511071]
||Fri, 29 January 2010 12:06
| Gerald Rosenberg
Registered: July 2009
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.
Powered by FUDForum
. Page generated in 0.11452 seconds