Can you show up the code where you send the event ?
François Meillet Formation Wicket - Développement Wicket Le 16 févr. 2013 à 16:56, grazia <[email protected]> a écrit : > I have overriden the onEvent method of the Palette class in the attempt to > populate the palette (on the unleselected choices side) with data from > another component (an autocomplete) on the same page. THe only problem I > have is that the unselected choice side of the palette shows a duplicate of > the object I am trying to add. I cannot understand why twice ... ANy > suggestion ? > > @Override > 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); > > } > } > > > } > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/unselected-choices-of-Palette-contain-duplicates-tp4656430.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >
