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

Render cell in ComboBoxes when no element is selected

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Withdrawn
    • Icon: P3 P3
    • 7u6
    • fx2.1.1
    • javafx
    • None
    • Windows XP, JDK7u4, JavaFX 2.2 b10

      Observed behaviour:
      In FX 2.2, Comboboxes' CellFactories appear not to be called when no value is selected.

      Expected behaviour:
      A combobox's CellFactory should be called even if no value is selected. This allows for the rendering choices (like i18n) to be separated from the UI logic.

      This is a regression from the 2.1 GA release. The attached screenshots show the same application running with only the JavaFX runtime changed.
      The attached code sample illustrates the intended use case.

        1. 2.1ShowsPrompt.jpg
          2.1ShowsPrompt.jpg
          8 kB
        2. 2.2ShowsNoPrompt.jpg
          2.2ShowsNoPrompt.jpg
          6 kB
        3. ComboDemo.java
          2 kB
        4. ComboDemo.java
          2 kB
        5. ComboDemo.java
          2 kB

            jgiles Jonathan Giles
            ureupkejfx Urs Reupke (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: