FEST

JComboBoxFixture.requireSelection(String) method with an editable combobox does not use cellReader

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: FEST-Swing 1.2a3
  • Fix Version/s: FEST-Swing 1.2a4
  • Component/s: Swing
  • Labels:
    None
  • Number of attachments :
    1

Description

We typically put POJOs in JComboBoxes and then specify a ListCellRenderer (along with a custom ComboBoxEditor as the combobox is editable) so that the combo box can display the POJO. In this case the code ends up in the JComboBoxSelectionValueQuery.selectionInEditableComboBox method just doing a toString on the object rather than using the cellReader therefore not giving what is actually selected in the combobox.

I look at creating a test case and adding it to this issue.

Activity

Hide
Glen Schrader added a comment -

I've hacked together a test that fails with the problem, I basically cloned JComboBoxSelectionValueQuery_selection_Test and modified it to suit my needs, the editor code is ugly since I can't post our complete combo box implementation.

Show
Glen Schrader added a comment - I've hacked together a test that fails with the problem, I basically cloned JComboBoxSelectionValueQuery_selection_Test and modified it to suit my needs, the editor code is ugly since I can't post our complete combo box implementation.
Hide
Alex Ruiz added a comment -

Thanks Glen for the test case. It makes my life a lot easier!

Show
Alex Ruiz added a comment - Thanks Glen for the test case. It makes my life a lot easier!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: