org.apache.wicket.model
Interface IChainingModel

All Superinterfaces:
IClusterable, IDetachable, IModel, java.io.Serializable
All Known Implementing Classes:
AbstractPropertyModel, BoundCompoundPropertyModel, CompoundPropertyModel, PropertyModel

public interface IChainingModel
extends IModel

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 © 2004-2009 Apache Software Foundation. All Rights Reserved.