Hi, On Mon, Apr 24, 2017 at 10:20 PM, Boris Goldowsky <bgoldow...@cast.org> wrote:
> I have a situation like this: > > public void renderHead(IHeaderResponse response) { > … > response.render(JavaScriptHeaderItem.forReference(resRef, > pageParameters1, “id1”)); > response.render(JavaScriptHeaderItem.forReference(resRef, > pageParameters2, “id2”)); > } > > where same ResourceReference is used for both resources – the different > page parameters point it to different actual Resources. > > However, the check for uniqueness of header items seems to consider them > equal, despite the different PageParameters and different IDs, and only one > of them actually gets rendered in the page head. > Which check exactly do you refer ? org.apache.wicket.markup.head.internal.HeaderResponse#markItemRendered() does such check by calling org.apache.wicket.markup.head.HeaderItem#getRenderTokens(). org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem#getRenderTokens() uses the url and the id. The url contains the parameters. All looks good to me! > > Is this a bug, or is there a way to force the two items to both be > included? > > I’m using Wicket 7.5.0. > > Boris > > > > >