|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.model.ComponentModel<T>
T
- type of model objectpublic class ComponentModel<T>
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.
Constructor Summary | |
---|---|
ComponentModel()
|
Method Summary | |
---|---|
void |
detach()
Detaches model after use. |
T |
getObject()
This getObject throws an exception. |
protected T |
getObject(Component component)
Returns the object from the model with the use of the component where it is attached to. |
protected void |
setObject(Component component,
T object)
Sets the model object for this model. |
void |
setObject(T object)
Sets the model object. |
IWrapModel<T> |
wrapOnAssignment(Component comp)
This method is called when the component gets its model assigned. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ComponentModel()
Method Detail |
---|
public final T getObject()
getObject
in interface IModel<T>
IModel.getObject()
public final void setObject(T object)
IModel
setObject
in interface IModel<T>
object
- The model objectIModel.setObject(java.lang.Object)
protected T getObject(Component component)
component
- The component which has this model.
protected void setObject(Component component, T object)
component
- The component which has this model.object
- The object that will be set in the model.public void detach()
IDetachable
detach
in interface IDetachable
IDetachable.detach()
public IWrapModel<T> wrapOnAssignment(Component comp)
IComponentAssignedModel
wrapOnAssignment
in interface IComponentAssignedModel<T>
IComponentAssignedModel.wrapOnAssignment(org.apache.wicket.Component)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |