Thanks for pointing me to this!

----- Ursprüngliche Mail -----
> Von: "Martin Grigorov" <mgrigo...@apache.org>
> An: users@wicket.apache.org
> Gesendet: Montag, 11. Juni 2018 12:11:32
> Betreff: Re: wicket 8 / RootRequestMapper vs CompoundRequestMapper

> Hi,
> 
> The main method for mounting is WebApplication#mount(IRequestMapper).
> It uses getRootRequestMapperAsCompound().add(mapper);, i.e. no matter
> whether your root mapper is already compound or not, Wicket will make it
> compound by wrapping it in SystemMapper
> 
> 
> https://github.com/apache/wicket/blob/950403d5ccea5643e6005450c6b808ea72079d59/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebApplication.java#L319
> https://github.com/apache/wicket/blob/950403d5ccea5643e6005450c6b808ea72079d59/wicket-core/src/main/java/org/apache/wicket/Application.java#L741-L750
> 
> On Mon, Jun 11, 2018 at 12:38 PM, Korbinian Bachl <
> korbinian.ba...@whiskyworld.de> wrote:
> 
>> Hi,
>>
>> situation: I need to add some "special" URL handling for certain URLs to
>> have product pages and catalog pages on root. As we also use brix we
>> already have at least one compoundRequestMapper already in use.
>> Now, wicket seems to have 2 places for that. A new RootRequestMapper e.g.:
>>
>> YourApplication#init():
>> old = application.getRootRequestMapper()
>> application.setRootRequestMapper(new CustomRequestMapper(old))
>>
>> or a CompoundRequestMapper e.g.:
>>
>> application.getRootRequestMapperAsCompound().add(new
>> CustomRequestMapper(old));
>>
>> But what are the pros or cons of using either RootRequestMapper vs
>> CompoundRequestMapper?
>>
>> From my point of view the only difference is that CompoundRequestMapper
>> gets exectued based on score, where max score gets used first and lower
>> scores later as long as the
>>
>> public IRequestHandler mapRequest(Request request)
>>
>> doesnt return null anymore; Did I miss something?
>>
>>
>> Best,
>>
>> KB
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>

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

Reply via email to