You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Guillaume Smet <gu...@gmail.com> on 2011/12/28 23:55:02 UTC

Weird MountMapper behaviour

Hi,

In Wicket 1.5.3, if I have the following mapping:
mountPage("/admin/user/", AdminUserListPage.class);
mountPage("/admin/user/${id}", AdminUserPage.class);

When I click on a link to AdminUserListPage.class, it's the
AdminUserPage which is called (and doesn't work because there isn't
any id parameter).

While I can find workaround to make it work, I think the mapping of
/admin/user/ should have a higher compatibility score. For example, we
could have a compatibility score of mountSegments.length * 10 + (url
is an exact match ? 1 : 0).

In fact I'm not even sure AdminUserPage should match as ${id} is
supposed to be mandatory.

Any opinion?

Thanks for your feedback.

-- 
Guillaume

Re: Weird MountMapper behaviour

Posted by Guillaume Smet <gu...@gmail.com>.
On Wed, Dec 28, 2011 at 11:55 PM, Guillaume Smet
<gu...@gmail.com> wrote:
> In Wicket 1.5.3, if I have the following mapping:
> mountPage("/admin/user/", AdminUserListPage.class);
> mountPage("/admin/user/${id}", AdminUserPage.class);

Same sort of problem with:
mountPage("/ticket/contract/", ...)
mountPage("/ticket/${id}/", ...)

(I added a / after the id to workaround the problem on the
/admin/user/${id}/ page but I then have the above problem on other
pages)

-- 
Guillaume