Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8098061

ChoiceBox missing "onAction" method

XMLWordPrintable

      Of the following "click to act" UI elements

      - Button (and variants, Toggle, Menu, etc.)
      - CheckBox
      - ChoiceBox
      - ColorPicker
      - ComboBox
      - HyperLink
      - RadioButton


      only ChoiceBox does not have an "onAction" method. All others do, and the method is supported in Scene Builder. (I suspect someone can quibble with "click to act" in a touch world, but let's not get hung up on a phrase.)

      Unless I'm missing something, ChoiceBox is missing an "onAction" method.

      Yes, the developer can dig deeply into implementation details and pull this rabbit out of the API hat:

      choiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener....);

      but why is this necessary only for ChoiceBox?


            jgiles Jonathan Giles
            pfurbachejfx Paul Furbacher (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: