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 aResourceReference
.- Author:
- papegaaij
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JavaScriptReferenceHeaderItem(ResourceReference reference, PageParameters pageParameters, String id)
Creates a newJavaScriptReferenceHeaderItem
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
List<HeaderItem>
getDependencies()
PageParameters
getPageParameters()
Iterable<? extends HeaderItem>
getProvidedResources()
ResourceReference
getReference()
Iterable<?>
getRenderTokens()
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
-
-
-
-
Constructor Detail
-
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 Detail
-
getReference
public ResourceReference getReference()
- Specified by:
getReference
in interfaceIReferenceHeaderItem
- Returns:
- the resource reference pointing to the javascript resource
-
getPageParameters
public PageParameters getPageParameters()
- Returns:
- the parameters for this Javascript resource reference
-
getDependencies
public List<HeaderItem> getDependencies()
- Overrides:
getDependencies
in classHeaderItem
- Returns:
- The dependencies this
HeaderItem
has. Dependencies will always be rendered before the item itself.
-
getProvidedResources
public Iterable<? extends HeaderItem> 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
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.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractJavaScriptReferenceHeaderItem
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classAbstractJavaScriptReferenceHeaderItem
-
-