Hey all,
I intend having a search where the user can search on two entitys in the database. eg-color and size, shape and sound, height and speed etc. I will provide this functionality through two combo boxs. When the app loads, ComboBox 1's default selection will be
color. ComboBox 2's default selection will be
size.
So combo box 1 should have all the possible values except the value selected in combobox 2 (color,shape,sound,height,speed)
and combo box 2 should have all the possible values except the value selected in combobox 1 (size,shape,sound,height,speed)
All works great so far!
Next, I add an item listener to combo box 1 saying
"if a value is selected in combobox 2, remove that value from combobox 1's set and add the previously selected value of combobox 2, back into combo box 1's set of possible values."
Similarly, I add an item listener to combo box 2 saying
"if a value is selected in combobox 1, remove that value from combobox 2's set and add the previously selected value of combobox 1, back into combo box 2's set of possible values."
This works superbly!
Until...
User selects their desired choice in combobox1 (combobox2's values immediatley update). The user then selects their desired choice in combobox2 (
combobox1's values immediatley update ).
If you are still reading do you have any ideas?
Thanks,
G