Ajaxformcomponentupdatingbehavior 1 5
This has the advantage that you can place your Feedback messages in any place you want.Add this to the Java part of the form: Add another SPAN tag for every feedback label.By default Wicket shows error messages together in a single place in the HTML form.This has some drawbacks to usability, especially if you have long forms with lots of fields.Read further for a tutorial exploring possibilities to improve the location of the error on the page, thereby improving usability.The default Feedback Panel shows all errors in one place.This is what we are going to make: As you can see, the error messages are directly next to the component that caused the error.This reduces the scanning of the page to link the error message to the right form component.
This behavior changes the CSS styles for components that are invalid according to the Wicket form validation.
I have written a Feedback Message Filter to accomplish that. I have included the Error Levels Feedback Message Filter in the project files, so you can reuse this in your existing projects.
Remember if you use the error() method, you cannot use this filter!
The name Feedback Label will also be updated when this is triggered, so that it will show the relevant error (or nothing if the input is valid).
Download the complete example project and start experimenting!