Module org.apache.wicket.core
Package org.apache.wicket.markup.head
Class JavaScriptReferenceHeaderItem
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.JavaScriptReferenceHeaderItem
- All Implemented Interfaces:
Serializable
,IReferenceHeaderItem
,ISubresourceHeaderItem
,IClusterable
public class JavaScriptReferenceHeaderItem
extends AbstractJavaScriptReferenceHeaderItem
implements IReferenceHeaderItem
HeaderItem
for script tags that are rendered using a ResourceReference
.- Author:
- papegaaij
- See Also:
-
Constructor Summary
ConstructorDescriptionJavaScriptReferenceHeaderItem
(ResourceReference reference, PageParameters pageParameters, String id) Creates a newJavaScriptReferenceHeaderItem
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Iterable<? extends HeaderItem>
Iterable<?>
int
hashCode()
void
Renders theHeaderItem
to the response.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
-
Constructor Details
-
JavaScriptReferenceHeaderItem
public JavaScriptReferenceHeaderItem(ResourceReference reference, PageParameters pageParameters, String id) Creates a newJavaScriptReferenceHeaderItem
.- Parameters:
reference
- resource reference pointing to the javascript resourcepageParameters
- the parameters for this Javascript resource referenceid
- id that will be used to filter duplicate reference (it's still filtered by URL too)
-
-
Method Details
-
getReference
- Specified by:
getReference
in interfaceIReferenceHeaderItem
- Returns:
- the resource reference pointing to the javascript resource
-
getPageParameters
- Returns:
- the parameters for this Javascript resource reference
-
getDependencies
- Overrides:
getDependencies
in classHeaderItem
- Returns:
- The dependencies this
HeaderItem
has. Dependencies will always be rendered before the item itself.
-
getProvidedResources
- Overrides:
getProvidedResources
in classHeaderItem
- Returns:
- The resources this
HeaderItem
provides. As these resources are provided by this item, they will no longer be rendered.
-
render
Description copied from class:HeaderItem
Renders theHeaderItem
to the response.- Specified by:
render
in classHeaderItem
-
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.
-
toString
-
hashCode
- Overrides:
hashCode
in classAbstractJavaScriptReferenceHeaderItem
-
equals
- Overrides:
equals
in classAbstractJavaScriptReferenceHeaderItem
-