I am using Wicket 1.5 as web layer for application. I needed a page that could take parameter but it should be optional.
So I have an URL like this http://example.com/search/keyword/1, it has 2 parameters search (keyword) and page (1), but I want page to be optional, so that URL like example.com/search/keyword should be mapped to the same page.
I tried to map it with mountPage(“/search/${keyword}/${page}”, SearchPage.class);
But the problem was that page parameter was mandatory.
So I have an URL like this http://example.com/search/keyword/1, it has 2 parameters search (keyword) and page (1), but I want page to be optional, so that URL like example.com/search/keyword should be mapped to the same page.
I tried to map it with mountPage(“/search/${keyword}/${page}”, SearchPage.class);
But the problem was that page parameter was mandatory.