T
- the type of the object for the modelpublic interface IModelReference<T> extends org.apache.wicket.model.IDetachable, IObservable
This service is observable as well, so it is possible to receive model change events by registering an
IObserver
with the service as the observable. An IModelReference.IModelChangeEvent
should be sent whenever
setModel(org.apache.wicket.model.IModel<T>)
is invoked.
The default implementation ModelReference
, takes care of sending the events.
Model services should be registered before any of the plugins that uses them is started. This makes it easier to create plugins that consume models (they don't need to register service trackers). Since generally a model is injected into a new plugin cluster, this is usually quite a natural thing to do.
Modifier and Type | Interface and Description |
---|---|
static interface |
IModelReference.IModelChangeEvent<T>
Event that's sent to
IObserver s of the service. |
Modifier and Type | Method and Description |
---|---|
org.apache.wicket.model.IModel<T> |
getModel()
Retrieve the current model of the model service
|
void |
setModel(org.apache.wicket.model.IModel<T> model)
Update the model of the service.
|
equals, hashCode, setObservationContext, startObservation, stopObservation
org.apache.wicket.model.IModel<T> getModel()
void setModel(org.apache.wicket.model.IModel<T> model)
IModelReference.IModelChangeEvent
.model
- the new modelCopyright © 2007–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.