|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.model.AbstractDetachableModel
wicket.model.LoadableDetachableModel
Model that makes working with detachable models a breeze. LoadableDetachableModel holds a temporary, transient model object, that is set on 'onAttach' by calling abstract method 'load', and that will be reset/ set to null on 'onDetach'. A usage example:
LoadableDetachableModel venueListModel = new LoadableDetachableModel()
{
protected Object load()
{
return getVenueDao().findVenues();
}
};
| Constructor Summary | |
LoadableDetachableModel()
Construct. |
|
| Method Summary | |
IModel |
getNestedModel()
Gets the nested model. |
protected abstract java.lang.Object |
load()
Loads and returns the (temporary) model object. |
protected void |
onAttach()
Attaches to the current request. |
protected void |
onDetach()
Detaches from the current request. |
protected java.lang.Object |
onGetObject(Component component)
Called when getObject is called in order to retrieve the detachable object. |
protected void |
onSetObject(Component component,
java.lang.Object object)
Called when setObject is called in order to change the detachable object. |
protected void |
setObject(java.lang.Object object)
Sets the object. |
| Methods inherited from class wicket.model.AbstractDetachableModel |
attach, detach, getObject, isAttached, setObject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LoadableDetachableModel()
| Method Detail |
protected final void onAttach()
AbstractDetachableModel
onAttach in class AbstractDetachableModelAbstractDetachableModel.onAttach()protected abstract java.lang.Object load()
protected final void onDetach()
AbstractDetachableModel
onDetach in class AbstractDetachableModelAbstractDetachableModel.onDetach()protected final java.lang.Object onGetObject(Component component)
AbstractDetachableModel
onGetObject in class AbstractDetachableModelcomponent - The component asking for the object
AbstractDetachableModel.onGetObject(wicket.Component)protected final void setObject(java.lang.Object object)
object - the object
protected final void onSetObject(Component component,
java.lang.Object object)
AbstractDetachableModel
onSetObject in class AbstractDetachableModelcomponent - The component asking for replacement of the model objectobject - The new model objectAbstractDetachableModel.onSetObject(wicket.Component, java.lang.Object)public final IModel getNestedModel()
IModel
getNestedModel in interface IModelgetNestedModel in class AbstractDetachableModelIModel.getNestedModel()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||