package org.apache.wicket.markup;
A subclass of MarkupElement which represents a "significant" markup tag, such
as a component open tag. Insignificant markup tags (those which are merely
concerned with markup formatting operations and do not denote components or
component nesting) are coalesced into instances of RawMarkup (also a subclass
of MarkupElement).
Standard component id attribute always available for components
regardless of user ApplicationSettings for id attribute; value ==
'wicket'.
Assuming this is a open (or open-close) tag, 'closes' refers to the
ComponentTag which closes it.
True if a href attribute is available and autolinking is on
The component's id identified by wicket:id="xxx"
The component's path in the markup
True, if attributes have been modified or added
If true, than the MarkupParser will ignore (remove) it.
private boolean ignore = false;
In case of inherited markup, the base and the extended markups are merged
and the information about the tags origin is lost. In some cases like
wicket:head and wicket:link this information however is required.
Tags which are detected to have only an open tag, which is allowed with
some HTML tags like 'br' for example
Automatically create a XmlTag, assign the name and the type, and
construct a ComponentTag based on this XmlTag.
- Parameters:
name
The name of html tagtype
The type of tag
Construct.
- Parameters:
tag
The underlying xml tag
Adds a behavior to this component tag.
- Returns:
- true if this tag has any behaviors added, false otherwise
- Returns:
- read only iterator over added behaviors
Gets whether this tag closes the provided open tag.
- Parameters:
open
The open tag- Returns:
- True if this tag closes the given open tag
If autolink is set to true, href attributes will automatically be
converted into Wicket bookmarkable URLs.
- Parameters:
autolink
enable/disable automatic href conversion
Get the tag's component id
- Returns:
- The component id attribute of this tag
Gets the length of the tag in characters.
If set, return the corresponding open tag (ComponentTag).
- Returns:
- The corresponding open tag
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT.
True if autolink is enabled and the tag contains a href attribute.
- Returns:
- True, if the href contained should automatically be converted
Compare tag name including namespace
- Parameters:
tag- Returns:
- true if name and namespace are equal
Makes this tag object immutable by making the attribute map unmodifiable.
Immutable tags cannot be made mutable again. They can only be copied into
new mutable tag objects.
Gets this tag if it is already mutable, or a mutable copy of this tag if
it is immutable.
- Returns:
- This tag if it is already mutable, or a mutable copy of this tag
if it is immutable.
Copies all internal properties from this tag to
dest.
This is basically cloning without instance creation.
- Parameters:
dest
tag whose properties will be set
public final void put(String key, boolean value)
Gets whether this tag does not require a closing tag.
- Returns:
- True if this tag does not require a closing tag
Set the component's id. The value is usually taken from the tag's id
attribute, e.g. wicket:id="componentId".
- Parameters:
id
The component's id assigned to the tag.
Assuming this is a close tag, assign it's corresponding open tag.
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT.
- Parameters:
type
The new type
- Returns:
- A synthetic close tag for this tag
Converts this object to a string representation.
- Returns:
- String version of this object
Write the tag to the response
- Parameters:
response
The response to write tostripWicketAttributes
if true, wicket:id are removed from outputnamespace
Wicket's namespace to use
String namespacePrefix = null;
if (stripWicketAttributes == true)
namespacePrefix = namespace + ":";
if ((namespacePrefix == null) || (key.startsWith(namespacePrefix) == false))
Converts this object to a string representation including useful
information for debugging
- Returns:
- String version of this object
- Returns:
- Returns the underlying xml tag.
Manually mark the ComponentTag being modified. Flagging the tag being
modified does not happen automatically.
- Returns:
- True, if the component tag has been marked modified
Gets the component path of wicket elements
Sets the component path of wicket elements
- Returns:
- True if the HTML tag (e.g. br) has no close tag
True if the HTML tag (e.g. br) has no close tag
In case of inherited markup, the base and the extended markups are merged
and the information about the tags origin is lost. In some cases like
wicket:head and wicket:link this information however is required.
- Returns:
- wicketHeaderClass
Set the class of wicket component which contains the wicket:head tag.
- Parameters:
wicketHeaderClass
wicketHeaderClass
Gets ignore.
- Returns:
- If true than MarkupParser will remove it from the markup
Sets ignore.
- Parameters:
ignore
If true than MarkupParser will remove it from the markup