|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 Form| Constructor Summary | |
|---|---|
CompoundPropertyModel(IModel<T> model)
Constructor |
|
CompoundPropertyModel(T object)
Constructor |
|
| Method Summary | ||
|---|---|---|
|
bind(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 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. |
|
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 object| Method 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 IDetachableIDetachable.detach()protected 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(String property)
S - the type of the propertyproperty -
public String toString()
toString in class ObjectObject.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 | |||||||||