Announcement Announcement Module
Collapse
No announcement yet.
New ComboBoxBinding and default value. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • New ComboBoxBinding and default value.

    Hi

    ComboBoxBinding changed a few times during January. Now by using the latest code fom CVS, I have noticed a change in behaviour (well my users have...)

    When I used to set the value on a ValueHolder, the associated combo box used to select the first item in the list. Now there is no default selection.

    Is there a way to revert to that behaviour by default?

    If not, what would be the recommended way for doing so?

    Code:
    private ValueHolder myOptions = new ValueHolder();
    ...
    protected JComponent createFormControl() {
    ...
      formBuilder.add(bindingFactory.createBoundComboBox("myProperty", myOptions));
    ...
    }
    
    private void setItems() {
      List options =... get the list given some criteria from the form...
      
      // this used to select the first item in the list as well as filling the ComboBox.
      myOptions.setValue(options);
    
    ...
    }
    many thanks

    Benoit
Working...
X