I need a general way of rendering a component specific error message right next to the component which caused it. Up to now I've used a Feedback panel, which isn't ideal if the page contains multiple components, requiring the user to scroll down the page. Also, if you place multiple Feedback panels on the page, they all display the same message. Is there a general way of rendering localised error messages near a specific component?
-
Have you seen this blog post: http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket ? It sounds like exactly what you want. – Raystorm Mar 06 '13 at 21:18
-
It is! Post as an answer and I'll give you the points. – Andrew Fielden Mar 07 '13 at 14:03
2 Answers
You can place multiple feedback panels on a page with different sets of messages. The FeedbackPanel
class has a constructor that takes an IFeedbackMessageFilter, and you can create your own implementations of this filter to limit the messages that will show.
To more completely localize your messages to appear next to the related form components, you can use a FormComponentFeedbackBorder. A good example of combining these to make a form show messages in a regular feedback panel but also highlight the bad fields is shown in this blog post.

- 40,677
- 6
- 91
- 113
-
Thanks, but I was more interested in how people have solved the problem of rendering localised error messages next to the relevant component. I may event want to highlight the component with a red border. – Andrew Fielden Mar 02 '13 at 17:42
There is an Excellent Blog post on this subject from a few years back.
That details how to have error messages show up next to the component that reported the error.
http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket

- 6,180
- 4
- 35
- 62