// Enable Guice for field injection on Wicket pages. Unfortunately, constructor injection into
// pages is not supported. Supplying ServletModule is optional; it enables usage of @RequestScoped and
// @SessionScoped, which may not be useful for Wicket applications because the WebPage instances are
// already stored in session, with their dependencies injected once per session.
addComponentInstantiationListener(new GuiceComponentInjector(this, new GuiceModule()));
// addComponentInstantiationListener(new GuiceComponentInjector(this, new ServletModule(), new GuiceModule()));
}