Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 198903

Summary: [DataBinding] ComboSingleSelectionObservableValue setValue() does not change selection
Product: [Eclipse Project] Platform Reporter: Ashley Cambrell <acambrell+eclipsebugs>
Component: UIAssignee: Boris Bokowski <bokowski>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bradleyjames
Version: 3.4   
Target Milestone: 3.3.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test case for ComboSingleSelectionObservableValue#setValue
none
Test case demonstrating CCombo.setText method works for changing the selection none

Description Ashley Cambrell CLA 2007-08-05 19:54:50 EDT
Created attachment 75407 [details]
Test case for ComboSingleSelectionObservableValue#setValue

Build ID: HEAD

Steps To Reproduce:
1. Run attached test case


More information:
ComboSingleSelectionObservableValue#doSetSelectionIndex uses 

getCombo().setText(getCombo().getItem(index));

to set the selection. This seems to work for CComboSingleSelectionObservableValue but not for Combo. Changing the line to 

getCombo().select(index);

makes the test case pass. The attached test case checks both the selection and the  expected text.
Comment 1 Ashley Cambrell CLA 2007-08-05 19:57:14 EDT
Created attachment 75408 [details]
Test case demonstrating CCombo.setText method works for changing the selection

CComboSingleSelectionObservableValue#doSetSelectionIndex uses

getCCombo().setText(getCCombo().getItem(index));

which works for selection change, but doesn't work for Combo.
Comment 2 Boris Bokowski CLA 2007-08-16 17:06:44 EDT
Fix was in patch for bug 198904. Brad, hope you are ok with this going into 3.3.1 as well.
Comment 3 Brad Reynolds CLA 2007-08-16 17:50:16 EDT
(In reply to comment #2)
> Brad, hope you are ok with this going into
> 3.3.1 as well.
> 

+1
Comment 4 Boris Bokowski CLA 2007-09-06 13:13:59 EDT
Verified in M20070905-1045 and released to HEAD as well (tests are only in HEAD).