Class JavaScriptContentHeaderItem

    • Constructor Detail

      • JavaScriptContentHeaderItem

        public JavaScriptContentHeaderItem​(CharSequence javaScript,
                                           String id)
        Creates a new JavaScriptContentHeaderItem.
        Parameters:
        javaScript - javascript content to be rendered.
        id - unique id for the javascript element. This can be null, however in that case the ajax header contribution can't detect duplicate script fragments.
    • Method Detail

      • getJavaScript

        public CharSequence getJavaScript()
        Returns:
        javascript content to be rendered.
      • render

        public void render​(org.apache.wicket.request.Response response)
        Description copied from class: HeaderItem
        Renders the HeaderItem to the response.
        Specified by:
        render in class HeaderItem
      • getRenderTokens

        public Iterable<?> getRenderTokens()
        Specified by:
        getRenderTokens in class HeaderItem
        Returns:
        The tokens this HeaderItem can be identified by. If any of the tokens has already been rendered, this HeaderItem will not be rendered.