Re: How to use the JavaScriptDeferHeaderResponse correctly?

2022-02-02 Thread Bas Gooren
Hi Sven, Thank you for the workaround, I’ll try it out this week. I have also created a jira issue for this: https://issues.apache.org/jira/browse/WICKET-6953 Met vriendelijke groet, Kind regards, Bas Gooren Op 1 februari 2022 bij 20:22:58, Sven Meier (s...@meiers.net) schreef: As a workaroun

Re: How to use the JavaScriptDeferHeaderResponse correctly?

2022-02-01 Thread Sven Meier
As a workaround you could use this:     getHeaderResponseDecorators().add( (response) -> {        if (RequestCycle.get().find(AjaxRequestTarget.class) == null) {            response = new JavaScriptDeferHeaderResponse(response);        }        return response;     });

Re: How to use the JavaScriptDeferHeaderResponse correctly?

2022-02-01 Thread Sven Meier
Hi Bas, that seems to be broken since https://issues.apache.org/jira/browse/WICKET-6703 The JS is correctly collected by PartialPageUpdate, but then sent through the response decorators once again, thus being wrapped in a 'DOMContentLoaded' listener. Please open a Jira issue. Regards Sven

Re: How to use the JavaScriptDeferHeaderResponse correctly?

2022-02-01 Thread Sven Meier
Hi Bas, your attachment didn't make it through the mailing list. Can you point me to where I can download it from? Thanks Sven On 31.01.22 14:51, Bas Gooren wrote: Hi, We are experimenting with the JavaScriptDeferHeaderResponse, but out of the box it doesn’t work correctly for us. We are

How to use the JavaScriptDeferHeaderResponse correctly?

2022-01-31 Thread Bas Gooren
Hi, We are experimenting with the JavaScriptDeferHeaderResponse, but out of the box it doesn’t work correctly for us. We are on wicket 9.7.0. On an Ajax call (e.g. link click), the response includes a ‘DOMContentLoaded’ event listener (which is not needed there). Since that never fires, any javas