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
By default this is equal to the wicket:id="xxx" attribute value, but may be provided e.g. for
auto-tags
The component's path in the markup
True, if attributes have been modified or added
If true, than the MarkupParser will ignore (remove) it. Temporary working variable
private transient boolean ignore = false;
If true, than the tag contain an automatically created wicket id
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
Filters and Handlers may add their own attributes to the tag
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
Constructor
- Parameters:
tag
The ComponentTag tag which this wicket tag is based upon.
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
- TODO:
- change to return unmodifiable list which will never be null. See Component.getBehavior
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
A convenient method. The same as getAttributes().getString(name)
- Parameters:
name- Returns:
- The attributes value
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(final String key, final boolean value)
public final void put(final String key, final int 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:
<C>wicketHeaderClass
wicketHeaderClass
if (wicketHeaderClass == null)
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
- Returns:
- True, if wicket:id has been automatically created (internal component)
- Parameters:
auto
True, if wicket:id has been automatically created (internal component)
Gets userData.
- Parameters:
key
The key to store and retrieve the value- Returns:
- userData
Sets userData.
- Parameters:
key
The key to store and retrieve the valuevalue
The user specific value to store
For subclasses to override. Gets called just before a Component gets rendered. It is
guaranteed that the markupStream is set on the Component and determineVisibility is not yet
called.
- Parameters:
component
The component that is about to be renderedmarkupStream
The current amrkup stream