Thanks a lot Martin!

I now did an quick override of it and now all URLs are absolute like I wanted 
them to be... Is there a special reason why wicket is so into this relative 
nightmare? I mean, why not just make all either absolute or full-URLs? 

I mean depending on the Url paths you get so great things like (same jquery, 
different wicket pages):

<script src="/wicket/resource/[...].js"
<script src="../wicket/resource/[...].js"
or even
<script src="../../wicket/resource/[...].js"

Why not just use absolute URLs global by default instead?





----- Ursprüngliche Mail -----
> Von: "Martin Grigorov" <mgrigo...@apache.org>
> An: users@wicket.apache.org
> Gesendet: Samstag, 28. April 2018 13:11:49
> Betreff: Re: make all links to absolute ones?

> In MyApplication.java use setRequestCycleProvider(() -> new
> MyRequestCycle())
> 
> On Sat, Apr 28, 2018 at 11:45 AM, Korbinian Bachl <
> korbinian.ba...@whiskyworld.de> wrote:
> 
>> Hi,
>>
>> in wicket 8 (M9) in RequestCylce there is
>>
>> protected UrlRenderer newUrlRenderer()
>>         {
>>                 // All URLs will be rendered relative to current request
>> (can be overridden afterwards)
>>                 return new UrlRenderer(getRequest());
>>         }
>>
>> but how can I override it with a custom UrlRenderer? - I try to make all
>> URLs to absolute ones and I tried to just override the shouldRenderAsFull
>> with true in UrlRenderer but I cant seem to find how to make wicket use the
>> new UrlRenderer. The only part where this is used is in ServletWebResponse
>> as well as RequestCycle, however, RequestCycle itself is used only on
>> Application.internalInit and the warnings there to not touch it are strong
>> :/
>>
>> Any Idea how I can override this part globally?
>>
>> 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