java.lang.Object
org.apache.wicket.model.ComponentModel<T>
- Type Parameters:
T
- type of model object
- All Implemented Interfaces:
Serializable
,IComponentAssignedModel<T>
,IDetachable
,IModel<T>
,IClusterable
Quick model that is implements the IComponentAssignedModel and the IModel interfaces. Its a quick
replacement for the current setObject(Component,Object) and getObject(Component) methods when the
component is needed in the model.
- Author:
- jcompagner
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal T
This getObject throws an exception.protected T
Returns the object from the model with the use of the component where it is attached to.protected void
Sets the model object for this model.final void
Sets the model object.wrapOnAssignment
(Component comp) This method is called when the component gets its model assigned.
-
Constructor Details
-
ComponentModel
public ComponentModel()
-
-
Method Details
-
getObject
This getObject throws an exception. -
setObject
Description copied from interface:IModel
Sets the model object. -
getObject
Returns the object from the model with the use of the component where it is attached to.- Parameters:
component
- The component which has this model.- Returns:
- The object of the model.
-
setObject
Sets the model object for this model.- Parameters:
component
- The component which has this model.object
- The object that will be set in the model.
-
wrapOnAssignment
Description copied from interface:IComponentAssignedModel
This 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:
wrapOnAssignment
in interfaceIComponentAssignedModel<T>
- Returns:
- The WrapModel that wraps this model
-