| Deselecting a combo with JFace Databinding [message #333733] | 
Tue, 30 December 2008 08:24   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi, 
 
What is the best way to clean a combo or comboviewer with databinding  
setting the model value? There is a good snipet for it somewhere? I searched  
the snippets and examples and could not find anything. 
 
Actually, using a ComboViewer, I am just able to do this calling the  
deselectAll method. If I set the variable on the model to -1 (out of range  
values) it is not working. 
 
Thanks for any help. 
 
Marcelo
 |  
 |  
  | 
 | 
 | 
| Re: Deselecting a combo with JFace Databinding [message #333797 is a reply to message #333740] | 
Tue, 06 January 2009 07:35   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Tom/Eric, 
 
Thanks. 
 
I was making the bind with the combo widget (inside the combo viewer) and  
not the combo viewer itself. I changed to use the  
ViewerObservable.observeSingleSelection and the set(null) cleared the combos  
without problems. 
 
Regards, 
 
Marcelo 
 
"Tom Schindl" <tom.schindl@bestsolution.at> escreveu na mensagem  
news:gjdban$qad$1@build.eclipse.org... 
> Or setting the ComboViewer-Selection to StructuredSelection.EMPTY. 
> 
> Tom 
> 
> Eric Rizzo schrieb: 
>> On 12/30/2008 8:24 AM, Marcelo Alcantara wrote: 
>>> Hi, 
>>> 
>>> What is the best way to clean a combo or comboviewer with databinding 
>>> setting the model value? There is a good snipet for it somewhere? I 
>>> searched 
>>> the snippets and examples and could not find anything. 
>>> 
>>> Actually, using a ComboViewer, I am just able to do this calling the 
>>> deselectAll method. If I set the variable on the model to -1 (out of 
>>> range 
>>> values) it is not working. 
>> 
>> I would try setting the model value to null. 
>> 
>> Hope this helps, 
>> Eric 
> 
> 
> --  
> B e s t S o l u t i o n . at 
>  ------------------------------------------------------------ -------- 
> Tom Schindl                                          JFace-Committer 
>  ------------------------------------------------------------ --------
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.03027 seconds