java.lang.Object
org.apache.wicket.markup.head.HeaderItem
org.apache.wicket.markup.head.MetaDataHeaderItem
- All Implemented Interfaces:
Serializable
,IClusterable
- Direct Known Subclasses:
HtmlImportHeaderItem
HeaderItem
for meta information such as <meta> tags or
canonical <link>- Since:
- 6.17.0
- Author:
- andrea del bene
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMetaDataHeaderItem
(String tagName) Build a newMetaDataHeaderItem
havingtagName
as tag. -
Method Summary
Modifier and TypeMethodDescriptionaddTagAttribute
(String attributeName) Add a minimized tag attribute to the item.addTagAttribute
(String attributeName, Object attributeValue) Add a tag attribute to the item.boolean
static MetaDataHeaderItem
forHttpEquiv
(String httpEquiv, String content) Factory method to create <meta> tag.static MetaDataHeaderItem
forHttpEquiv
(IModel<String> httpEquiv, IModel<String> content) Factory method to create <meta> tag.static MetaDataHeaderItem
forLinkTag
(String rel, String href) Factory method to create <link> tag.static MetaDataHeaderItem
forLinkTag
(IModel<String> rel, IModel<String> href) Factory method to create <link> tag.static MetaDataHeaderItem
forMetaTag
(String name, String content) Factory method to create <meta> tag.static MetaDataHeaderItem
forMetaTag
(IModel<String> name, IModel<String> content) Factory method to create <meta> tag.Generate the string representation for the current item.Iterable<?>
int
hashCode()
void
Renders theHeaderItem
to the response.Methods inherited from class org.apache.wicket.markup.head.HeaderItem
getDependencies, getProvidedResources
-
Field Details
-
META_TAG
The meta tag name- See Also:
-
LINK_TAG
the link tag name- See Also:
-
-
Constructor Details
-
MetaDataHeaderItem
Build a newMetaDataHeaderItem
havingtagName
as tag.- Parameters:
tagName
- the name of the tag
-
-
Method Details
-
addTagAttribute
Add a tag attribute to the item. If the attribute value is aIModel
, the object wrapped inside the model is used as actual value.- Parameters:
attributeName
- the attribute nameattributeValue
- the attribute value- Returns:
- The current item.
-
addTagAttribute
Add a minimized tag attribute to the item. The attribute has no value and only its name is rendered (for example 'async')- Parameters:
attributeName
- the attribute name- Returns:
- The current item.
-
generateString
Generate the string representation for the current item.- Returns:
- The string representation for the current item.
-
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.
-
render
Description copied from class:HeaderItem
Renders theHeaderItem
to the response.- Specified by:
render
in classHeaderItem
-
forHttpEquiv
Factory method to create <meta> tag.- Parameters:
httpEquiv
- the 'httpEquiv' attribute of the tagcontent
- the 'content' attribute of the tag- Returns:
- A new
MetaDataHeaderItem
-
forHttpEquiv
Factory method to create <meta> tag.- Parameters:
httpEquiv
- the 'httpEquiv' attribute of the tagcontent
- the 'content' attribute of the tag- Returns:
- A new
MetaDataHeaderItem
-
forMetaTag
Factory method to create <meta> tag.- Parameters:
name
- the 'name' attribute of the tagcontent
- the 'content' attribute of the tag- Returns:
- A new
MetaDataHeaderItem
-
forMetaTag
Factory method to create <meta> tag.- Parameters:
name
- the 'name' attribute of the tag as String modelcontent
- the 'content' attribute of the tag as String model- Returns:
- A new
MetaDataHeaderItem
-
forLinkTag
Factory method to create <link> tag.- Parameters:
rel
- the 'rel' attribute of the taghref
- the 'href' attribute of the tag- Returns:
- A new
MetaDataHeaderItem
-
forLinkTag
Factory method to create <link> tag.- Parameters:
rel
- the 'rel' attribute of the tag as String modelhref
- the 'href' attribute of the tag as String model- Returns:
- A new
MetaDataHeaderItem
-
equals
-
hashCode
-