Hi,

I have the following use case:
A form contains an AJAX submit button. The onSubmit() looks like this:

public void onSubmit(AjaxRequestTarget target, Form<?> inviteForm) {
    if (..some case...) {
        info("This does not show up");
        setResponsePage(getPage());
    } else {
        info("This shows up");
        target.addComponent(feedback);
    }
}

The problem is that the feedback message in the first case does not show up
because I am not updating a single component but refreshing the whole page
(using setResponsePage()).
In this case all component messages are cleaned before the page is redered
again. This happens in WebSession.cleanupFeedbackMessages().

One solution would be to use session messages (e.g. using
getSession().info()). Session messages are not cleaned up the same way and
the message shows up.
The problem with this approach is that on my page I have multiple
FeedbackPanels for different components. Therefore the message apears
everywhere. There is no way to
distinguish Session messages and set an IFeedbackMessageFilter on the
different FeedbackPanels.

So my question is: Is there a way to associate a feedback message to a
specific FeedbackPanel when doing an AJAX submit and using setRespnsePage()?

Thanks,
Conrad

Reply via email to