After migration to Wicket 1.5 I'm wondering why our tests with our own IPageFactory implementation is not working anymore. In our tests we use the following code ...
WicketTester tester = new WicketTester(); tester.getApplication().getSessionSettings().setPageFactory( new FooPageFactory() ); But in Wicket 1.5 the implemented SessionSettings class and their method getPageFacory() is only called from Session#getPageFactory() and SignInPanel#onBeforeRender methods, in which the first call is used in the InlineFrame class only. As I figured out you should use and override the newPageFactory() method from the Application class instead to create a custom IPageFactory implementation. Which whould result in the following code ... WicketTester tester = new WicketTester(new MockApplication() { protected IPageFactory newPageFactory() { return new FooPageFactory(); } }); The Application#getPageFactory() method is used in the DefaultMapperContext class to create a new Page instance, therefore our own implementation is used. But this is confusing to me. Maybe I miss a point but in my opinion the ISessionSettings interface should be marked as deprecated. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/PageFactory-and-SessionSettings-tp3854493p3854493.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org