Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » What should I do to bind CheckboxTreeViewer to my list model?
What should I do to bind CheckboxTreeViewer to my list model? [message #558412] Sun, 12 September 2010 10:45 Go to next message
Frank is currently offline Frank
Messages: 23
Registered: July 2010
Junior Member
Hello, I'm going to use

ViewersObservables.observeCheckedElements(...)

to get observable set of a CheckboxTreeViewer and bind it to my underlying model. However, the data in my model is a List not a Set.

say, myModel.getCities() returns a List object.

And,

bindingContext.bindSet( checkedObjTypes, new ListToSetAdapter( list ) );

seems not work.

So, what am I suppose to do to realize it? Thanks.
Re: What should I do to bind CheckboxTreeViewer to my list model? [message #558427 is a reply to message #558412] Sun, 12 September 2010 14:47 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5292
Registered: July 2009
Senior Member
This would be the only solution and the correct one. Could you provide a
snippet we can use to reproduce your problem?

Tom

Am 12.09.10 16:45, schrieb Frank:
> Hello, I'm going to use
> ViewersObservables.observeCheckedElements(...)
>
> to get observable set of a CheckboxTreeViewer and bind it to my
> underlying model. However, the data in my model is a List not a Set.
>
> say, myModel.getCities() returns a List object.
>
> And,
> bindingContext.bindSet( checkedObjTypes, new ListToSetAdapter( list ) );
>
> seems not work.
>
> So, what am I suppose to do to realize it? Thanks.
Re: What should I do to bind CheckboxTreeViewer to my list model? [message #558484 is a reply to message #558427] Mon, 13 September 2010 04:37 Go to previous message
Frank is currently offline Frank
Messages: 23
Registered: July 2010
Junior Member
Hello, Tom

I found the real reason it does't wok is that there are more than one object type in my tree viewer. (content provider returns various typed children)

I want to bind the checked item of specified object type in the tree viewer to my underlying model.

So what should I do in this case?


Previous Topic:Test Tool For RCP Application
Next Topic:RCP and Usability
Goto Forum:
  


Current Time: Wed Aug 27 19:28:07 EDT 2014

Powered by FUDForum. Page generated in 0.09918 seconds