Thanks Guys for your help. Gennadiy
"Peter Thomas" <[EMAIL PROTECTED] com> To Sent by: wicket-user@lists.sourceforge.net wicket-user-bounc [EMAIL PROTECTED] cc rge.net Subject 03/22/2007 10:52 Re: [Wicket-user] Wicket and Error AM messages Please respond to [EMAIL PROTECTED] .sourceforge.net Regarding filtering of messages, I had asked this earlier which Igor answered. http://www.nabble.com/-Wicket-user--Removing-messages-from-FeedBackPanel-tf3058081.html#a8502575 So I created a filter like this: public class MyFeedbackMessageFilter implements IFeedbackMessageFilter { private Set<String> previous = new HashSet<String>(); public void reset() { previous.clear(); } public boolean accept(FeedbackMessage fm) { if(!previous.contains(fm.getMessage())) { previous.add(fm.getMessage()); return true; } return false; } } Add this to the FeedbackPanel using setfilter() You have to "reset" this everytime the form bind-validation cycle happens else else previous errors will persist, so I override validate() on the Form to do this: @Override protected void validate() { filter.reset(); super.validate(); } Hope this helps. - Peter. On 3/22/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: On 3/22/07, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > The other question is how do we make the error messages dynamic.. For > example I have 2 address components on the page and both of the components > have address 1 and address 2 fields. Still one address shows the address of > the person, while the other address shows the address of the person's > child. When I have the error message I would have liked to see something > like "Member address 1 us missing", not just "address 1 is missing". In > other words my messages need to be parameterized based not only on the > field name, but also on some property that is stored in Model for the panel > that holds other elements. Use field.setLabel() to set your dynamic text. Martijn -- Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket community at irc.freenode.net: ##wicket Wicket 1.2.5 will keep your server alive. Download Wicket now! http://wicketframework.org ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net 's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user To: wicket-user@lists.sourceforge.net cc: From: [EMAIL PROTECTED] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user