Package org.apache.wicket.markup.head
Class JavaScriptUrlReferenceHeaderItem
- java.lang.Object
-
- org.apache.wicket.markup.head.HeaderItem
-
- org.apache.wicket.markup.head.AbstractCspHeaderItem
-
- org.apache.wicket.markup.head.JavaScriptHeaderItem
-
- org.apache.wicket.markup.head.AbstractJavaScriptReferenceHeaderItem
-
- org.apache.wicket.markup.head.JavaScriptUrlReferenceHeaderItem
-
- All Implemented Interfaces:
Serializable
,ISubresourceHeaderItem
,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 Summary
Constructors Constructor Description JavaScriptUrlReferenceHeaderItem(String url, String id)
Creates a newJavaScriptUrlReferenceHeaderItem
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Iterable<?>
getRenderTokens()
String
getUrl()
int
hashCode()
void
render(Response response)
Renders theHeaderItem
to the response.String
toString()
-
Methods inherited from class org.apache.wicket.markup.head.AbstractJavaScriptReferenceHeaderItem
getCharset, getCrossOrigin, getIntegrity, getType, internalRenderJavaScriptReference, isAsync, isDefer, setAsync, setCharset, setCrossOrigin, setDefer, setIntegrity, setType
-
Methods inherited from class org.apache.wicket.markup.head.JavaScriptHeaderItem
forReference, forReference, forReference, forScript, forUrl, forUrl, getId, setId
-
Methods inherited from class org.apache.wicket.markup.head.AbstractCspHeaderItem
getNonce, setNonce
-
Methods inherited from class org.apache.wicket.markup.head.HeaderItem
getDependencies, getProvidedResources
-
-
-
-
Constructor Detail
-
JavaScriptUrlReferenceHeaderItem
public JavaScriptUrlReferenceHeaderItem(String url, String id)
Creates a newJavaScriptUrlReferenceHeaderItem
.- Parameters:
url
- context-relative url of the the javascript resourceid
- id that will be used to filter duplicate reference (it's still filtered by URL too)
-
-
Method Detail
-
render
public void render(Response response)
Description copied from class:HeaderItem
Renders theHeaderItem
to the response.- Specified by:
render
in classHeaderItem
-
getRenderTokens
public Iterable<?> getRenderTokens()
- Specified by:
getRenderTokens
in classHeaderItem
- Returns:
- The tokens this
HeaderItem
can be identified by. If any of the tokens has already been rendered, thisHeaderItem
will not be rendered.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractJavaScriptReferenceHeaderItem
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractJavaScriptReferenceHeaderItem
-
-