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

ChioceBox by update the observable list makes all items for 2 times

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Cannot Reproduce
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7 and Netbeans 7.0.1

      Description

      If i try to update the items of a choicebox over his observablelist all items of the observablelist is showing twice in the choicebox. i've looking in debug mode and in the observablelist everything is fine.

      Code to reproduce it:
      private ObservableList<String> excercise = FXCollections.observableArrayList();
      private ChoiceBox<String> excerciseBox = new ChoiceBox<>(excercise);
      private String[] exerciseKeySet;

      then in the construktor
      excercise.addAll(Arrays.asList(exerciseKeySet));

      until her everything works well

      but after a update to the data in exercisekeyset i try to reload the data with:
      excercise.setAll(Arrays.asList(exerciseKeySet));

      The lenght of the Array at the moment of the update are 3 and in the choicebox are showing 6 items
      And now all items are showing twice (see also screenshot attached

        Attachments

          Activity

            People

            • Assignee:
              psomashe Parvathi Somashekar (Inactive)
              Reporter:
              mgalbierjfx Markus Galbier (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: