Class JavaScriptUrlReferenceHeaderItem

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.wicket.util.io.IClusterable

    public class JavaScriptUrlReferenceHeaderItem
    extends AbstractJavaScriptReferenceHeaderItem
    HeaderItem for script tags that are rendered using a fixed URL, for example resources from an external site or context relative urls.
    Author:
    papegaaij
    See Also:
    Serialized Form
    • Constructor Detail

      • JavaScriptUrlReferenceHeaderItem

        public JavaScriptUrlReferenceHeaderItem​(java.lang.String url,
                                                java.lang.String id,
                                                boolean defer,
                                                java.lang.String charset,
                                                java.lang.String condition)
        Creates a new JavaScriptUrlReferenceHeaderItem.
        Parameters:
        url - context-relative url of the the javascript resource
        id - id that will be used to filter duplicate reference (it's still filtered by URL too)
        defer - specifies that the execution of a script should be deferred (delayed) until after the page has been loaded.
        charset - a non null value specifies the charset attribute of the script tag
        condition - the condition to use for Internet Explorer conditional comments. E.g. "IE 7".
    • Method Detail

      • getUrl

        public java.lang.String getUrl()
        Returns:
        context-relative url of the the javascript resource
      • 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 java.lang.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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object