|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.model.CompoundPropertyModel<T>
T
- The model object typepublic class CompoundPropertyModel<T>
A simple compound model which uses the component's name as the property expression to retrieve properties on the nested model object. CompoundPropertyModel is a chaining model so it will call get/setobject on the given object if the object is an instanceof IModel itself.
IModel
,
Model
,
LoadableDetachableModel
,
IChainingModel
,
Serialized FormConstructor Summary | |
---|---|
CompoundPropertyModel(IModel<T> model)
Constructor |
|
CompoundPropertyModel(T object)
Constructor |
Method Summary | ||
---|---|---|
|
bind(java.lang.String property)
Binds this model to a special property by returning a model that has this compound model as its nested/wrapped model and the property which should be evaluated. |
|
void |
detach()
Detaches model after use. |
|
IModel<?> |
getChainedModel()
Returns the chained model if there is a chained model. |
|
T |
getObject()
Gets the model object. |
|
static
|
of(IModel<Z> model)
Type-infering factory method |
|
protected java.lang.String |
propertyExpression(Component component)
Returns the property expression that should be used against the target object |
|
void |
setChainedModel(IModel<?> model)
Sets the model that is chained inside this model. |
|
void |
setObject(T object)
Sets the model object. |
|
java.lang.String |
toString()
|
|
|
wrapOnInheritance(Component component)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CompoundPropertyModel(IModel<T> model)
model
- The modelpublic CompoundPropertyModel(T object)
object
- The model objectMethod Detail |
---|
public T getObject()
IModel
getObject
in interface IModel<T>
IModel.getObject()
public void setObject(T object)
IModel
setObject
in interface IModel<T>
object
- The model objectIModel.setObject(java.lang.Object)
public IModel<?> getChainedModel()
IChainingModel
getChainedModel
in interface IChainingModel<T>
IChainingModel.getChainedModel()
public void setChainedModel(IModel<?> model)
IChainingModel
setChainedModel
in interface IChainingModel<T>
IChainingModel.setChainedModel(org.apache.wicket.model.IModel)
public void detach()
IDetachable
detach
in interface IDetachable
IDetachable.detach()
protected java.lang.String propertyExpression(Component component)
component
-
public <C> IWrapModel<C> wrapOnInheritance(Component component)
wrapOnInheritance
in interface IComponentInheritedModel<T>
C
- the model object type of the wrapped model
IComponentInheritedModel.wrapOnInheritance(org.apache.wicket.Component)
public <S> IModel<S> bind(java.lang.String property)
S
- the type of the propertyproperty
-
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static <Z> CompoundPropertyModel<Z> of(IModel<Z> model)
Z
- model
- model
CompoundPropertyModel
instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |