Class AbstractHeaderRenderStrategy

  • All Implemented Interfaces:
    IHeaderRenderStrategy
    Direct Known Subclasses:
    ChildFirstHeaderRenderStrategy, ParentFirstHeaderRenderStrategy

    public abstract class AbstractHeaderRenderStrategy
    extends Object
    implements IHeaderRenderStrategy
    An abstract implementation of a header render strategy which is only missing the code to traverse the child hierarchy, since the sequence of that traversal is what will make the difference between the different header render strategies. Besides the child hierarchy the render sequence by default (may be changed via subclassing) is as follows:
    • 1. application level headers
    • 2. the root component's headers
    • 3. the children hierarchy (to be implemented per subclass)
    Author:
    Juergen Donnerstag
    • Method Detail

      • renderInlineEnclosure

        protected void renderInlineEnclosure​(HtmlHeaderContainer container,
                                             InlineEnclosure enclosure)
        Searches for the siblings of the given enclosure for the controller of the given enclosure and renders that controller's header contributions. This is done explicitly because when an enclosed component is added to the AjaxRequestTarget and is consequently replaced for render by the enclosure, the component's header contributions would not make it to the response as the enclosure is a sibling of the component in the hierarchy and only children's header contributions are added to the response. Fixes WICKET-6459
        Parameters:
        container - the header container to render the header contributions of the enclosure's controller
        enclosure - the enclosure whose controller's contributions are going to be rendered