Skip to main content


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 14:45 Go to next message
Frank is currently offline FrankFriend
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 18:47 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
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 08:37 Go to previous message
Frank is currently offline FrankFriend
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: Fri Apr 26 08:58:20 GMT 2024

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

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

Back to the top