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

[ChoiceBox] provide method for item rerendering

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u20
    • javafx

      ChoiceBox is able to render the selected item by invoking toString on it. However, if at some point the state of the item changes, and the item needs to be rerendered, there seems to be no pretty way of ensuring that it is.

      Now, at first you might think that I could just select null and then reselect my item, but that is not preferable as this will invoke any selection listeners, which in my application triggers persistence of the client side state.

      The default choice box skin has a method for updating the label, but it is currently private.

      I have found a work-around, which is to add a dummy item to the items of the choicebox and then removing it again. This works, and makes the choicebox rerender the selected item, but I think this solution will not make anybody's mom proud.

            Unassigned Unassigned
            risaksen Randahl Isaksen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: