wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francois Meillet <francois.meil...@gmail.com>
Subject Re: unselected choices of Palette contain duplicates ...
Date Sat, 16 Feb 2013 21:39:22 GMT
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 <Grazia.RussoLassner@gmail.com> 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message