|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- Model object.public interface IModel<T>
A IModel wraps the actual model Object used by a Component. IModel implementations are used as a facade for the real model so that users have control over the actual persistence strategy. Note that objects implementing this interface will be stored in the Session. Hence, you should use (non-transient) instance variables sparingly.
Model
.
IDetachable.detach()
, so that
interface implementers can detach transient information when a model is no longer being actively
used by the framework. This reduces memory use and reduces the expense of replicating the model
in a clustered server environment. To implement a detachable model, you should generally extend
LoadableDetachableModel
instead of implementing IModel directly.
getObject()
method
is called, the value returned will depend on the Component which is asking for the value.
Likewise, the setObject(Object)
method sets a different property depending on which
Component is doing the setting. For more information on CompoundPropertyModels and model
inheritance, see CompoundPropertyModel
and
Page
.
Component.sameInnermostModel(org.apache.wicket.Component)
,
Component.sameInnermostModel(IModel)
Method Summary | |
---|---|
T |
getObject()
Gets the model object. |
void |
setObject(T object)
Sets the model object. |
Methods inherited from interface org.apache.wicket.model.IDetachable |
---|
detach |
Method Detail |
---|
T getObject()
void setObject(T object)
object
- The model object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |