Start with an example using the pojo from 4
Subclass wicket.markup.html.WebPage and in the constructor initialize and add the required Form implementation.
Subclass wicket.markup.html.form.Form and in the constructor add the necessary form elements.
These will be bound to the individual html form elements through the wicket:id attributes.
The html form itself must contain a wicket:id attribute that matches the Form added to the WebPage. Each form element must also have a corresponding wicket:id to each FormComponent added to the Form. In this example the form is bound to the "customerForm" Form instance and the text input is bound to the "name" TextField. There is also a single submit button that is not bound to any component. Wicket automatically provides the submission handling functionality through the Form base class implementation. Button components only need to be added to the Form if multiple buttons are required.
Updating the model
What happens when the form is submitted? Describe how the automatic updating of pojo's when property models are used. Describe how to use buttons and a button-less form.
NO LONGER VALID AS OF RC1, FORM parent method doesn't take a FeedbackPanel
Describe how validation works and how to implement custom validation. Also give a short explanation of how to display messages.
Adding RequiredValidator to a form element will allow only non-null and non-empty values to pass validation successfully.
For convenience the class RequiredTextField is provided. This TextField automatically includes a RequiredValidator.
To provide validation feedback a FeedbackPanel can be instantiated. This should be added to the page (for display) and associated with the form by passing it into the form constructor.
The FeedbackPanel can then be added to the html with a wicket:id span.
Finally, create a .properties file in the same directory as your html template and class file using the same naming conventions. In this case it would be called EditCustomerPage.properties. Use this file to define the error messages for each input in the form.
Describe how conversion works (when using property models) and how to implement custom conversion.
Give a list with a short description of the form components that are available in core.