How to avoid unnecessary Wicket log warnings when using FeedbackLabels field links?

I use "FeedbackLabels" to display ideas about inspecting components based on ideas and codes in this blog post: Wicket form validation .

The problem is that pages using such FeedbackLabels for verification messages flood the log with redundant warnings:

2012-05-04 10:43:32,824 ["http-bio-8080"-exec-6] WARN  org.apache.wicket.protocol.http.WebSession - Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "Tilille on pakollinen tieto", reporter = toAccount, level = ERROR]
2012-05-04 10:43:32,824 ["http-bio-8080"-exec-6] WARN  org.apache.wicket.protocol.http.WebSession - Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "TililtΓ€ on pakollinen tieto", reporter = fromAccount, level = ERROR]
2012-05-04 10:43:32,824 ["http-bio-8080"-exec-6] WARN  org.apache.wicket.protocol.http.WebSession - Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "Viitenro on pakollinen tieto", reporter = reference, level = ERROR]
2012-05-04 10:43:35,039 ["http-bio-8080"-exec-6] WARN  org.apache.wicket.protocol.http.WebSession - Component-targetted feedback message was left unrendered. This could be because you are missing a FeedbackPanel on the page.  Message: [FeedbackMessage message = "Tilille on pakollinen tieto", reporter = toAccount, level = ERROR]
[...]

Wicket claims that:

Component feedback message left unloaded. It could, it can because you don't have a FeedbackPanel page on the page.

The thing is, as you can see in the screenshot, these messages were visualized (in the FeedbackLabels files that accompany each field), and I do also have a FeedbackPanel on (but it filters messages aimed at the component using the ComponentFeedbackMessageFilter so that they do not appear twice )

enter image description here

In any case, these log messages are clearly not useful. How can I make Wicket shut up about it ? (Without resorting to brute force methods, such as changing the logging level to FATAL.) Should something be fixed in the implementation of Daan FeedbackLabel (see below)?


: FeedbackLabel ( ) , , , . , , :

// (Author of this code is Daan, StuQ.nl
// it licenced under Apache 2.0 license.)
@Override
protected void onBeforeRender() {
    super.onBeforeRender();

    if(component.getFeedbackMessage()!=null) {
        if(this.text!=null) {
            setDefaultModel(this.text);
        } else {
            setDefaultModel(new Model(component.getFeedbackMessage().getMessage()));
        }

        this.add(new AttributeModifier("class", true, new Model("feedbackLabel " + component.getFeedbackMessage().getLevelAsString())));
    } else {
        setDefaultModel(new Model(""));
    }
}
+3
1

FeedbackMessage markRendered(). , . .

+2

All Articles