/**
* Called when a null model is about to be retrieved in order to allow a subclass to provide an
* initial model.
* <p>
* By default this implementation looks components in the parent chain owning a
* {@link IComponentInheritedModel} to provide a model for this component via
* {@link IComponentInheritedModel#wrapOnInheritance(Component)}.
* <p>
* For example a {@link FormComponent} has the opportunity to instantiate a model on the fly
* using its {@code id} and the containing {@link Form}'s model, if the form holds a
* {@link CompoundPropertyModel}.
*
* @return The model
*/
protected IModel<?> initModel()
{
IModel<?> foundModel = null;
// Search parents for IComponentInheritedModel (i.e. CompoundPropertyModel)
for (Component current = getParent(); current != null; current = current.getParent())
{
// Get model
// Don't call the getModel() that could initialize many in between
// completely useless models.
// IModel model = current.getDefaultModel();
IModel<?> model = current.getModelImpl();
if (model instanceof IWrapModel && !(model instanceof IComponentInheritedModel))
{
model = ((IWrapModel<?>)model).getWrappedModel();
}
if (model instanceof IComponentInheritedModel)
{
// return the shared inherited
foundModel = ((IComponentInheritedModel<?>)model).wrapOnInheritance(this);
setFlag(FLAG_INHERITABLE_MODEL, true);
break;
}
}
// No model for this component!
return foundModel;
}
Welcome to the world of evidence! Evidence-based teaching is effective teaching, and we bring you the most effective methods. Read on to find out more.
The impasse in math and science instruction runs deeper than test scores or the latest educational theory. What can we learn from the best teachers on the front
W. Aiello, F. Chung, and L. Lu. STOC '00: Proceedings of the thirty-second annual ACM symposium on Theory of computing, page 171--180. New York, NY, USA, ACM Press, (2000)
B. Bollob&\#225;s, C. Borgs, J. Chayes, and O. Riordan. SODA '03: Proceedings of the fourteenth annual ACM-SIAM symposium on Discrete algorithms, page 132--139. Philadelphia, PA, USA, Society for Industrial and Applied Mathematics, (2003)
O. Paulzen, and P. Perc. Enabling Organisations and Society through Information Systems, Proceedings of the 13th Australasian Conference on Information Systems (ACIS 2002), page 243-253. Melbourne, (2002)