Btw, I just noticed that adding this constructor eliminates the problem:
public MyPage() {
    this(null);
}

So I take it Wicket tries to build the page via the Page(PageParameters)
but instead of using a null reference to the PageParameters it builds an
object without any parameters in it.

If the default constructor is added, then it can invoke the custom
PageParameters constructor with the null reference.
I don't recall this behavior. Has this changed recently?


On Wed, Jan 15, 2014 at 1:45 PM, Paul Bors <p...@bors.ws> wrote:

> Suppose I have a page with the default constructor and with the page
> parameter constructor.
>
> Should my page parameter constructor be called with an empty not null
> PageParameter instance when no parameters are provided? Shouldn't the
> default constructor be used instead?
>
> What about in unit tests?
> I've seen the tester use the page parameter constructor and pass it a
> reference to an empty PageParameters when I invoke
> tester.startPage(MyPage.class, null).
>

Reply via email to