You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (Jira)" <ji...@apache.org> on 2022/12/25 22:02:00 UTC

[jira] [Closed] (WICKET-7020) HeaderResponses of HeaderDecorators processed in reversed order

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

Sven Meier closed WICKET-7020.
------------------------------
      Assignee: Sven Meier
    Resolution: Not A Problem

A decorator added via #add() will decorate the response first, one added via #addPostProcessingDecorator() will decorate last (i.e. after resource aggregation) and one added via #addPreResourceAggregationDecorator() will decorate immediately before resource aggregration.

This might be confusing, because the resulting chain of invocations of IHeaderResponse#render() happens in reverse order actually, but the naming is consistent.

Please use the mailing-list for questions in the future.

> HeaderResponses of HeaderDecorators processed in reversed order
> ---------------------------------------------------------------
>
>                 Key: WICKET-7020
>                 URL: https://issues.apache.org/jira/browse/WICKET-7020
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 9.9.1
>            Reporter: Hans Schäfer
>            Assignee: Sven Meier
>            Priority: Minor
>
> My scenario: I build my own HeaderDecorator and added it using:
> application.getHeaderResponseDecorators().addPreResourceAggregationDecorator(...)
> I expected that ResourceAggregation takes place after processing the HeaderResponse of my HeaderDecorator. But this did not happen
> Looking at the code I found the method HeaderResponseDecoratorCollection#decorate. This Method reverts the order of the processing of the HeaderResponses: the HeaderResponse of the last HeaderDecorator is the first HeaderResponse in the chain.
> Is this a bug or is this behavior as expected and the methodName "addPreResourceAggregationDecorator" was just misunderstood by myself? 
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)