Probably you are not refreshing the component but rather recreating it. Hence the different eclipse debugger id's. If this is inside a listview, setReuseItems(true)
This behavior is most certainly not a bug in the Objects.equals(). Martijn On Wed, Mar 10, 2010 at 5:03 PM, Fernando Wermus <fernando.wer...@gmail.com> wrote: > ComponentFeedBackPanel called to org.apache.wicket.util.lang.Objects.equals > to decide if there is a error message to show. > > The implementation of this method is the following, > > if (a == b) > > { > > return true; > > } > > > if ((a != null) && (b != null) && a.equals(b)) > > { > > return true; > > } > > > return false; > > > For instance, > > > a is > > [MarkupContainer [Component id = date]] > > and in eclipse variables appears as [DateTextField id=460] > > > while > > > b is > > [MarkupContainer [Component id = date]] > > and in eclipse variables appears as [DateTextField id=463] > > then this is returing false. This behavior only happens if the > ComponentFeedBackPanel > *is refreshed by ajax. ** * > > > I develop another class to test if I was misunderstanding the problem, but > it worked: > > > package com.misPartidos.web.eventos.paneles; > > > import org.apache.wicket.Component; > > import org.apache.wicket.feedback.FeedbackMessage; > > import org.apache.wicket.feedback.IFeedbackMessageFilter; > > import org.apache.wicket.markup.html.panel.FeedbackPanel; > > > public class MyComponentFeedbackPanel extends FeedbackPanel { > > > private static final long serialVersionUID = 1080609018238015083L; > > > public MyComponentFeedbackPanel(String id, final Component filter) { > > super(id); > > setFilter(new IFeedbackMessageFilter(){ > > private static final long serialVersionUID = 3610826326194213455L; > > > �...@override > > public boolean accept(FeedbackMessage message) { > > final Component a=filter; > > final Component b=message.getReporter(); > > if (a == b) > > { > > return true; > > } > > if ((a!= null) && (b != null) && *a.getId().equals(b.getId()))* > > { > > return true; > > } > > > return false; > > } > > }); > > } > > > } > > I am just testing ids between a and b. > > Does anyone has expirienced this wrong behavior with ComponentFeedBackPanel > in an ajax refreshed? > > thanks in advance. > > > -- > Fernando Wermus. > > www.linkedin.com/in/fernandowermus > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org