Wicket 6 no longer keeps feedback messages in session. Now they are attached to components, which I think is great move but I approach an issue connected with that. I used to remove all feedback messages that were related to the specific form like this :
Session.get().getFeedbackMessages().clear(new ContainerFeedbackMessageFilter(panelForm));
Unfortunetly right now I can't clear it like this:
panelForm.getFeedbackMessages().clear();
For obvious reasons - they are attached to components inside form.
So is there a way to get those feedback messages by only accesing (in my case) panelForm
or my only way to go is to call getFeedbackMessages()
on all of my components (panelForm.component1, panelForm.component2 etc)?
use FeedbackCollector as in example: