|
|
|
|
|
Re: [databinding] How to manipulate record order in a TableViewer [message #512107 is a reply to message #511823] |
Wed, 03 February 2010 22:45 |
Gerald Rosenberg Messages: 106 Registered: July 2009 |
Senior Member |
|
|
In article <hkb3k8$49n$1@build.eclipse.org>, matthall@woodcraftmill.com
says...
>
> Gerald Rosenberg wrote:
> > Yes, but isn't that the model side of the binding?
>
> Yes, that's correct. I've found this model to work pretty well in practice.
>
> > My model is not available in my view - the binding is performed elsewhere through an abstraction
> > mechanism. Not a purist, but it would seem to be cleaner if these actions could be implemented
> > using the view side of the binding. Any support for this?
>
> If you are binding a model list to a viewer list then you could just as
> well apply these changes to the viewer list. As long as you apply the
> changes to an IObservableList it will be picked up by Databinding.
>
> Or am I missing something?
>
> Matthew
Actually I was missing something.
Just realized you *can* get a usable IObservableList from a bound
TableViewer.
TableViewer#getInput returns a BeanObservableListDecorator which is
internal, a decorator of other internal type stuff, and (insert other
good reasons for not looking closer).
But, turns out that it also implements an IObservableList. Haven't
tried it yet, but as you say it should work.
Thanks,
Gerald
|
|
|
Powered by
FUDForum. Page generated in 0.03246 seconds