Description
Page.onInitialize() will be called even if constructor throws an exception
in case below code is added in wicket WebApplication.init():
getComponentInstantiationListeners().add(new IComponentInstantiationListener() {
@Override
public void onInstantiation(Component component) {
component.add(new Behavior() {
});
}
});
It seems that the instantiation listener adds the behavior to the page at very start of the page constructor, and then the page is marked as dirty to cause onInitialize() being called afterwards.