Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Deselecting a combo with JFace Databinding
Deselecting a combo with JFace Databinding [message #333733] Tue, 30 December 2008 13:24 Go to next message
Marcelo Alcantara is currently offline Marcelo AlcantaraFriend
Messages: 48
Registered: July 2009
Member
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 #333737 is a reply to message #333733] Tue, 30 December 2008 14:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

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
Re: Deselecting a combo with JFace Databinding [message #333740 is a reply to message #333737] Tue, 30 December 2008 14:30 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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
------------------------------------------------------------ --------
Re: Deselecting a combo with JFace Databinding [message #333797 is a reply to message #333740] Tue, 06 January 2009 12:35 Go to previous message
Marcelo Alcantara is currently offline Marcelo AlcantaraFriend
Messages: 48
Registered: July 2009
Member
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
> ------------------------------------------------------------ --------
Previous Topic:Eclipse Platform UI testing
Next Topic:Stretching the section vertically
Goto Forum:
  


Current Time: Thu Jul 25 18:37:03 GMT 2024

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

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

Back to the top