Package org.apache.wicket.markup.head
Class JavaScriptContentHeaderItem
- 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.JavaScriptContentHeaderItem
-
- All Implemented Interfaces:
Serializable
,IClusterable
public class JavaScriptContentHeaderItem extends JavaScriptHeaderItem
HeaderItem
for internal (embedded in the header) javascript content.- Author:
- papegaaij
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JavaScriptContentHeaderItem(CharSequence javaScript, String id)
Creates a newJavaScriptContentHeaderItem
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
CharSequence
getJavaScript()
Iterable<?>
getRenderTokens()
int
hashCode()
void
render(Response response)
Renders theHeaderItem
to the response.String
toString()
-
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
-
JavaScriptContentHeaderItem
public JavaScriptContentHeaderItem(CharSequence javaScript, String id)
Creates a newJavaScriptContentHeaderItem
.- 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(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 classJavaScriptHeaderItem
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classJavaScriptHeaderItem
-
-