API / Apache Wicket Interview questions
What are the types of built-in form components in Wicket?
Wicket ships a set of ready-made FormComponent subclasses that cover the common HTML input types, each one binding an IModel to a specific control and handling its own conversion and validation.
| Component | Renders as |
| TextField | <input type="text"> |
| TextArea | <textarea> |
| CheckBox | <input type="checkbox"> |
| RadioChoice / RadioGroup | <input type="radio"> group |
| DropDownChoice | <select> |
| ListMultipleChoice | multi-select <select> |
| PasswordTextField | <input type="password"> |
All of these must live inside a Form component to participate in submission, and each one is typically constructed with a wicket:id and a model, e.g. new TextField<>("username", new PropertyModel<>(user, "username")), so the field automatically reads and writes that property.
More Related questions...