How-to guides
Directions for a specific goal.
- Read and write data with lambda models Use lambdas, method references and the default methods of IModel to show computed values and bind components to properties without strings.
- Bind components to a JavaBean Read and write bean properties with PropertyModel, and let form fields find their property by id with CompoundPropertyModel.
- Chain models Wrap one model in another so that a form, a panel or a label always works on the object the inner model currently holds.
- Load data once per request with detachable models Keep only an id in the page and load the entity fresh in every request with LoadableDetachableModel.
- Use more than one model in a component Detach the extra models a component, behavior or custom model keeps in its fields, so their data is not stored with the page.
Reference
The classes, tags and settings, described.
- Model classes Every model class and model interface in wicket-core, the default methods of IModel, the factory methods and the component methods that work with models.
Explanation
Why Wicket works the way it does.
- Models and component data Why a component reads its data through a model, what happens to that data between requests, and why wrapping an entity in Model goes wrong.