https://issues.apache.org/jira/browse/WICKET-4093

On Thu, Sep 29, 2011 at 8:54 AM, Martin Grigorov <mgrigo...@apache.org> wrote:
> Indeed this is missed.
> I'll create a ticket for it.
>
> Thanks!
>
> On Thu, Sep 29, 2011 at 8:05 AM, Dirk Forchel <dirk.forc...@exedio.com> wrote:
>> 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
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to