In the onEvent method, update.getModelObject() is added to the choices collection. The collection is not a Set, but a List. So each time you add an item to choices, you create a new entry.
François Meillet Formation Wicket - Développement Wicket Le 16 févr. 2013 à 16:56, grazia <grazia.russolass...@gmail.com> a écrit : > public void onEvent(IEvent<?> event) { > > super.onEvent(event); > > if (event.getPayload() instanceof MyUpdate){ > MyUpdate update = (MyUpdate)event.getPayload(); > > > Collection choices= this.getChoices(); > choices.add(update.getModelObject()); > this.getChoices().retainAll(choices); > > update.getTarget().add(this);