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 Rosenberg
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.

Thanks...
Previous Topic:dropdown menu in main toolbar ... menu items can't be checked
Next Topic:What is the "Preject References" for?
Goto Forum:
  


Current Time: Tue Sep 23 12:37:06 GMT 2014

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

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