org.apache.wicket.model
Interface IChainingModel<T>

Type Parameters:
T - The Model object type
All Superinterfaces:
IClusterable, IDetachable, IModel<T>, java.io.Serializable
All Known Implementing Classes:
AbstractPropertyModel, CompoundPropertyModel, PropertyModel

public interface IChainingModel<T>
extends IModel<T>

Models that implement this interface will support chaining of IModels. getObject() of a IChainingModel should do something like:

 if ( object instanceof IModel) { return ((IModel)object).getObject()}
 else return object;
 
ChainingModels should also take care that the internal model detach is called when detach is called on them.

Author:
jcompagner, Igor Vaynberg (ivaynberg)
See Also:
CompoundPropertyModel, AbstractPropertyModel

Method Summary
 IModel<?> getChainedModel()
          Returns the chained model if there is a chained model.
 void setChainedModel(IModel<?> model)
          Sets the model that is chained inside this model.
 
Methods inherited from interface org.apache.wicket.model.IModel
getObject, setObject
 
Methods inherited from interface org.apache.wicket.model.IDetachable
detach
 

Method Detail

setChainedModel

void setChainedModel(IModel<?> model)
Sets the model that is chained inside this model.

Parameters:
model -

getChainedModel

IModel<?> getChainedModel()
Returns the chained model if there is a chained model.

Returns:
The chained model


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.