/**
* @see org.apache.wicket.Component#setModel(org.apache.wicket.model.IModel)
*/
public Component setModel(final IModel model)
{
final IModel previous = getModelImpl();
super.setModel(model);
if (previous instanceof IComponentInheritedModel)
{
visitChildren(new IVisitor()
{
public Object component(Component component)
{
IModel compModel = component.getModel();
if (compModel instanceof IWrapModel)
{
compModel = ((IWrapModel)compModel).getWrappedModel();
}
if (compModel == previous)