You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Olivier Dutrieux <ol...@pasteur.fr> on 2019/04/24 13:37:56 UTC

setHeaderResponseDecorator and setGatherExtendedBrowserInfo(true)

Hello,

I have define on application.init() the setHeaderResponseDecorator (to
deferred all javascript to the end of the page) and set
setGatherExtendedBrowserInfo to true to retrieve some informations from
browser.

The problem is when the BrowserInfoPage is render no js is add to the page
because the BrowserInfoPage  doesn't have the component
HeaderResponseContainer to deferred the js.

How can I solve this problem ?

Duto

-----
Duto
--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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


Re: setHeaderResponseDecorator and setGatherExtendedBrowserInfo(true)

Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Apr 24, 2019 at 3:48 PM Olivier Dutrieux <
olivier.dutrieux@pasteur.fr> wrote:

> Hello,
>
> I have define on application.init() the setHeaderResponseDecorator (to
> deferred all javascript to the end of the page) and set
> setGatherExtendedBrowserInfo to true to retrieve some informations from
> browser.
>
> The problem is when the BrowserInfoPage is render no js is add to the page
> because the BrowserInfoPage  doesn't have the component
> HeaderResponseContainer to deferred the js.


> How can I solve this problem ?
>

You can provide your own version of BrowserInfoPage by overriding
WebSession#newBrowserInfoPage():
https://github.com/apache/wicket/blob/bd4c0c786aa810765d9e7f12a62a6fed56db2c62/wicket-core/src/main/java/org/apache/wicket/protocol/http/WebSession.java#L109


>
> Duto
>
> -----
> Duto
> --
> Sent from:
> http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: setHeaderResponseDecorator and setGatherExtendedBrowserInfo(true)

Posted by Francois Meillet <fr...@gmail.com>.
In the application.init() add the following line :

getResourceBundles().add(YourApplication.class, new JavaScriptResourceReference(BrowserInfoForm.class, "wicket-browser-info.js"));

YourApplication.class is the {@linkplain ResourceReference#getScope() scope} of your bundle

François




> Le 24 avr. 2019 à 15:37, Olivier Dutrieux <ol...@pasteur.fr> a écrit :
> 
> Hello,
> 
> I have define on application.init() the setHeaderResponseDecorator (to
> deferred all javascript to the end of the page) and set
> setGatherExtendedBrowserInfo to true to retrieve some informations from
> browser.
> 
> The problem is when the BrowserInfoPage is render no js is add to the page
> because the BrowserInfoPage  doesn't have the component
> HeaderResponseContainer to deferred the js.
> 
> How can I solve this problem ?
> 
> Duto
> 
> -----
> Duto
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


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