T
- The model data typepublic interface IComponentAssignedModel<T> extends IModel<T>
Component.setDefaultModel(IModel)
) should implement this interface. One reason for a
model to want to do this is if it needs to be aware of the component it is bound to.
The algorithm wicket employs is similar to this:
void Component.setModel(IModel model) { if (model instanceof IComponentAssignedModel) { this.model = ((IComponentAssignedModel)model).wrapOnAssignment(this); } else { this.model = model; } }For an example see
ResourceModel
Modifier and Type | Method and Description |
---|---|
IWrapModel<T> |
wrapOnAssignment(Component component)
This method is called when the component gets its model assigned.
|
IWrapModel<T> wrapOnAssignment(Component component)
component
- Copyright © 2006–2022 Apache Software Foundation. All rights reserved.