On Tue, Oct 17, 2017 at 12:39 PM, Korbinian Bachl < korbinian.ba...@whiskyworld.de> wrote:
> and if you make it > > Integer.MAX_VALUE - 1 > > as default? :) > Of course :). But I'd like to avoid to upset the current logic to solve this issue. MountedMapper uses AbstractBookmarkableMapper#getCompatibilityScore to compute its score and it can not simply return Integer.MAX_VALUE. > ----- Ursprüngliche Mail ----- > > Von: "Andrea Del Bene" <an.delb...@gmail.com> > > An: dev@wicket.apache.org > > Gesendet: Dienstag, 17. Oktober 2017 12:11:06 > > Betreff: Re: WICKET-6481 > > > On Tue, Oct 17, 2017 at 9:32 AM, Martin Grigorov <mgrigo...@apache.org> > > wrote: > > > >> Hi, > >> > >> MountedMapper should return higher compatibilityScore for "page/foo" > than > >> PageInstanceMapper for the same path. > >> > > > > This is not so easy as PageInstanceMapper already returns > Integer.MAX_VALUE > > if it matches. > > > > > >> Even more strict: PageInstanceMapper should not deal with anything that > has > >> more segments than "page". > >> > >> > > This is easier to do and less risky IMHO. > > > > I think we should also check at startup time if someone has mounted a > page > > to '/page' path (with DefaultMapperContext), which is totally > incompatible > > with PageInstanceMapper > > > > > >> Martin Grigorov > >> Wicket Training and Consulting > >> https://twitter.com/mtgrigorov > >> > >> On Mon, Oct 16, 2017 at 6:35 PM, Andrea Del Bene <an.delb...@gmail.com> > >> wrote: > >> > >> > Hi, > >> > > >> > this issue is caused by a problem with mounted entities (pages, > >> resources, > >> > packages). If the path we use starts with segments from IMapperContext > >> the > >> > corresponding mapper is not resolved. For example a page mounted to > >> > 'page/foo' is handled with a PageInstanceMapper and not with its > >> > MountedMapper. > >> > What should we do? Should we check the path when we mount it and > rise an > >> > exception if it is not compatible with IMapperContext? > >> > > >> > Andrea. > >> > >