|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.model.ComponentDetachableModel<T>
T - The model object typepublic class ComponentDetachableModel<T>
Quick detachable 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 a detachable model.
| Constructor Summary | |
|---|---|
ComponentDetachableModel()
|
|
| Method Summary | |
|---|---|
protected void |
attach()
Attaches to the current request. |
void |
detach()
Detaches from the current request. |
T |
getObject()
This getObject throws an exception. |
protected T |
getObject(Component component)
Called when getObject is called in order to retrieve the detachable object. |
boolean |
isAttached()
Gets whether this model has been attached to the current session. |
protected void |
setAttached()
Set this model in an attached state. |
protected void |
setObject(Component component,
T object)
Called when setObject is called in order to change the detachable object. |
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 ComponentDetachableModel()
| 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)public final boolean isAttached()
protected final void setAttached()
public void detach()
detach in interface IDetachableprotected void attach()
protected T getObject(Component component)
component - The component asking for the object
protected void setObject(Component component,
T object)
component - The component asking for replacement of the model objectobject - The new model objectpublic 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 | |||||||||