[ 
https://issues.apache.org/jira/browse/WICKET-6617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Solodovnik updated WICKET-6617:
-------------------------------------
    Description: 
Components added via AJAX and contributing to {{<head>}} using {{@Override 
renderHead}} ignores {{<wicket:header-items/>}} if any

Here is the example:
Imaging you have following markup:
{code}
<html>
  <head>
    <wicket:header-items/>
    <title>Hello</title>
  </head>
  <body>
      ........
  </body>
<html>
{code}

In your java code you replacing component A with component B on the page via 
AJAX
Component B contributing to {{<head>}} as follows:
{code}
        @Override
        public void renderHead(IHeaderResponse response) {
                super.renderHead(response);
                response.render(JavaScriptHeaderItem.forReference(new 
JavaScriptResourceReference(B.class, "some.js")));
        }
{code}

As developer I would expect additional JS/CSS files (or any other header 
resources) will be appended before {{<title>}} tag since I have placed 
{{<wicket:header-items/>}} tag

Currently only initial header resources will take {{<wicket:header-items/>}} 
into account

  was:Components added via AJAX and contributing to <head> using @Override 
renderHead ignores <wicket:header-items/> if any


> Header contribution ignore <wicket:header-items/>
> -------------------------------------------------
>
>                 Key: WICKET-6617
>                 URL: https://issues.apache.org/jira/browse/WICKET-6617
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 8.2.0
>            Reporter: Maxim Solodovnik
>            Assignee: Maxim Solodovnik
>            Priority: Major
>
> Components added via AJAX and contributing to {{<head>}} using {{@Override 
> renderHead}} ignores {{<wicket:header-items/>}} if any
> Here is the example:
> Imaging you have following markup:
> {code}
> <html>
>   <head>
>     <wicket:header-items/>
>     <title>Hello</title>
>   </head>
>   <body>
>       ........
>   </body>
> <html>
> {code}
> In your java code you replacing component A with component B on the page via 
> AJAX
> Component B contributing to {{<head>}} as follows:
> {code}
>       @Override
>       public void renderHead(IHeaderResponse response) {
>               super.renderHead(response);
>               response.render(JavaScriptHeaderItem.forReference(new 
> JavaScriptResourceReference(B.class, "some.js")));
>       }
> {code}
> As developer I would expect additional JS/CSS files (or any other header 
> resources) will be appended before {{<title>}} tag since I have placed 
> {{<wicket:header-items/>}} tag
> Currently only initial header resources will take {{<wicket:header-items/>}} 
> into account



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to