I have a page that does the same validations to multiple fields.  I would
like only one error message to display "There were one or more errors found
when validating fields."

Here's what I did:
    FeedbackPanel feedback = new FeedbackPanel("feedback", new
IFeedbackMessageFilter() {
      public boolean accept(FeedbackMessage feedbackMessage) {
      //ProductionTrackingSheetPage.this.getFeedbackMessage()
      
if(Session.get().getFeedbackMessages().messages(null).contains(feedbackMessage))
{
           System.out.println("Already have message: " + feedbackMessage);
           return false;
       }
        return false;
      }
    });

The problem is that when I load the page and there are two errors, it
displays none.  Both times the System.out.print says it already has that
message.  It seems like the error message was added to the FeedbackPanel
before it checked whether or not the accept function was run.

Am I missing something simple?  Is there another way I should be removing
filtering out duplicates?
-- 
View this message in context: 
http://www.nabble.com/How-do-I-remove-duplicate-FeedbackMessages-from-a-FeedbackPanel--tp20274678p20274678.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to