Package org.apache.wicket.model
Class ComponentPropertyModel<T>
- java.lang.Object
-
- org.apache.wicket.model.ComponentPropertyModel<T>
-
- Type Parameters:
T- The Model object
- All Implemented Interfaces:
java.io.Serializable,IComponentAssignedModel<T>,IDetachable,IModel<T>,org.apache.wicket.util.io.IClusterable
public class ComponentPropertyModel<T> extends java.lang.Object implements IComponentAssignedModel<T>
A model that references a property by name on the current model of the component it is bound to. This enables direct usage of inherited models such as compound property models.- Author:
- Jonathan Locke
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ComponentPropertyModel(java.lang.String propertyName)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetObject()Gets the model object.voidsetObject(T object)Sets the model object.IWrapModel<T>wrapOnAssignment(Component component)This method is called when the component gets its model assigned.
-
-
-
Method Detail
-
setObject
public final void setObject(T object)
Description copied from interface:IModelSets the model object.
-
wrapOnAssignment
public IWrapModel<T> wrapOnAssignment(Component component)
Description copied from interface:IComponentAssignedModelThis method is called when the component gets its model assigned. WARNING: Because the model can be assigned in the constructor of component this method can also be called with a 'this' of a component that is not fully constructed yet.- Specified by:
wrapOnAssignmentin interfaceIComponentAssignedModel<T>- Returns:
- The WrapModel that wraps this model
-
-