package pl.tomaszdziurko.jvm_bloggers.view.panels;

import org.apache.wicket.feedback.FeedbackMessage;
import org.apache.wicket.feedback.IFeedbackMessageFilter;
import org.apache.wicket.markup.html.panel.FeedbackPanel;

public class CustomFeedbackPanel extends FeedbackPanel {

    final static String COMMON_FEEDBACK_CSS_CLASS = "feedbackPanelItem";

    public CustomFeedbackPanel(String id) {
        super(id);
    }

    public CustomFeedbackPanel(String id, IFeedbackMessageFilter filter) {
        super(id, filter);
    }


    @Override
    protected String getCSSClass(FeedbackMessage message) {
        return COMMON_FEEDBACK_CSS_CLASS + " " + super.getCSSClass(message);
    }
}

@@ -279,21 +279,23 @@
     
-final
+private
  static 
 Stri
@@ -290,16 +290,22 @@
  static 
+final 
 String C
@@ -416,16 +416,94 @@
 er(id);%0A
+        setOutputMarkupId(true);%0A        setOutputMarkupPlaceholderTag(true);%0A
     %7D%0A%0A 
@@ -607,18 +607,95 @@
 r);%0A    
+    setOutputMarkupId(true);%0A        setOutputMarkupPlaceholderTag(true);%0A    
 %7D
-%0A
 %0A%0A    @O

Move ajax-related markup methods innto CustomFeedbackPanel so we do not have to call them each time we want to use feedback panel with Ajax