|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.markup.MarkupElement org.apache.wicket.markup.ComponentTag
public class ComponentTag
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).
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_WICKET_NAMESPACE
Standard component id attribute always available for components regardless of user ApplicationSettings for id attribute; value == 'wicket'. |
protected XmlTag |
xmlTag
The underlying xml tag |
Constructor Summary | |
---|---|
ComponentTag(java.lang.String name,
XmlTag.Type type)
Automatically create a XmlTag, assign the name and the type, and construct a ComponentTag based on this XmlTag. |
|
ComponentTag(XmlTag tag)
Construct. |
Method Summary | |
---|---|
void |
addBehavior(IBehavior behavior)
Adds a behavior to this component tag. |
boolean |
closes(MarkupElement open)
Gets whether this tag closes the provided open tag. |
void |
enableAutolink(boolean autolink)
If autolink is set to true, href attributes will automatically be converted into Wicket bookmarkable URLs. |
boolean |
equalTo(MarkupElement element)
This is not an implementation of equals because we don't care about hashCodes for MarkupElements yet. |
IValueMap |
getAttributes()
|
java.util.Iterator |
getBehaviors()
|
java.lang.String |
getId()
Get the tag's component id |
int |
getLength()
Gets the length of the tag in characters. |
java.lang.Class |
getMarkupClass()
In case of inherited markup, the base and the extended markups are merged and the information about the tags origin is lost. |
java.lang.String |
getName()
|
boolean |
getNameChanged()
|
java.lang.String |
getNamespace()
|
ComponentTag |
getOpenTag()
If set, return the corresponding open tag (ComponentTag). |
java.lang.String |
getPath()
Gets the component path of wicket elements |
int |
getPos()
|
java.lang.CharSequence |
getString(java.lang.String key)
|
XmlTag.Type |
getType()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
java.lang.Object |
getUserData(java.lang.String key)
Gets userData. |
boolean |
hasBehaviors()
|
boolean |
hasEqualTagName(ComponentTag tag)
Compare tag name including namespace |
boolean |
hasNoCloseTag()
|
boolean |
isAutoComponentTag()
|
boolean |
isAutolinkEnabled()
True if autolink is enabled and the tag contains a href attribute. |
boolean |
isClose()
|
boolean |
isIgnore()
Gets ignore. |
boolean |
isModified()
|
boolean |
isOpen()
|
boolean |
isOpen(java.lang.String id)
|
boolean |
isOpenClose()
|
boolean |
isOpenClose(java.lang.String id)
|
void |
makeImmutable()
Makes this tag object immutable by making the attribute map unmodifiable. |
ComponentTag |
mutable()
Gets this tag if it is already mutable, or a mutable copy of this tag if it is immutable. |
void |
put(java.lang.String key,
boolean value)
|
void |
put(java.lang.String key,
java.lang.CharSequence value)
|
void |
put(java.lang.String key,
int value)
|
void |
put(java.lang.String key,
StringValue value)
|
void |
putAll(java.util.Map map)
|
void |
remove(java.lang.String key)
|
boolean |
requiresCloseTag()
Gets whether this tag does not require a closing tag. |
void |
setAutoComponentTag(boolean auto)
|
void |
setHasNoCloseTag(boolean hasNoCloseTag)
True if the HTML tag (e.g. |
void |
setId(java.lang.String id)
Set the component's id. |
void |
setIgnore(boolean ignore)
Sets ignore. |
void |
setMarkupClass(java.lang.Class wicketHeaderClass)
Set the class of wicket component which contains the wicket:head tag. |
void |
setModified(boolean modified)
Manually mark the ComponentTag being modified. |
void |
setName(java.lang.String name)
|
void |
setNamespace(java.lang.String namespace)
|
void |
setOpenTag(ComponentTag tag)
Assuming this is a close tag, assign it's corresponding open tag. |
void |
setType(XmlTag.Type type)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
void |
setUserData(java.lang.String key,
java.lang.Object value)
Sets userData. |
java.lang.CharSequence |
syntheticCloseTagString()
|
java.lang.CharSequence |
toCharSequence()
|
java.lang.String |
toString()
Converts this object to a string representation. |
java.lang.String |
toUserDebugString()
Converts this object to a string representation including useful information for debugging |
void |
writeOutput(Response response,
boolean stripWicketAttributes,
java.lang.String namespace)
Write the tag to the response |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_WICKET_NAMESPACE
protected final XmlTag xmlTag
Constructor Detail |
---|
public ComponentTag(java.lang.String name, XmlTag.Type type)
name
- The name of html tagtype
- The type of tagpublic ComponentTag(XmlTag tag)
tag
- The underlying xml tagMethod Detail |
---|
public final void addBehavior(IBehavior behavior)
behavior
- public final boolean hasBehaviors()
public final java.util.Iterator getBehaviors()
public final boolean closes(MarkupElement open)
closes
in class MarkupElement
open
- The open tag
public final void enableAutolink(boolean autolink)
autolink
- enable/disable automatic href conversionpublic final IValueMap getAttributes()
XmlTag.getAttributes()
public final java.lang.String getId()
public final int getLength()
public final java.lang.String getName()
XmlTag.getName()
public final boolean getNameChanged()
XmlTag.getNameChanged()
public final java.lang.String getNamespace()
XmlTag.getNamespace()
public final ComponentTag getOpenTag()
public final int getPos()
XmlTag.getPos()
public final java.lang.CharSequence getString(java.lang.String key)
key
- The key
XmlTag.getString(String)
public final XmlTag.Type getType()
XmlTag.getType()
public final boolean isAutolinkEnabled()
public final boolean isClose()
XmlTag.isClose()
public final boolean isOpen()
XmlTag.isOpen()
public final boolean isOpen(java.lang.String id)
id
- Required component id
XmlTag.isOpen()
public final boolean isOpenClose()
XmlTag.isOpenClose()
public final boolean isOpenClose(java.lang.String id)
id
- Required component id
XmlTag.isOpenClose()
public boolean hasEqualTagName(ComponentTag tag)
tag
-
public final void makeImmutable()
public ComponentTag mutable()
public final void put(java.lang.String key, boolean value)
key
- The keyvalue
- The valueXmlTag.put(String, boolean)
public final void put(java.lang.String key, int value)
key
- The keyvalue
- The valueXmlTag.put(String, int)
public final void put(java.lang.String key, java.lang.CharSequence value)
key
- The keyvalue
- The valueXmlTag.put(String, CharSequence)
public final void put(java.lang.String key, StringValue value)
key
- The keyvalue
- The valueXmlTag.put(String, StringValue)
public final void putAll(java.util.Map map)
map
- a key/value mapXmlTag.putAll(Map)
public final void remove(java.lang.String key)
key
- The key to removeXmlTag.remove(String)
public final boolean requiresCloseTag()
public final void setId(java.lang.String id)
id
- The component's id assigned to the tag.public final void setName(java.lang.String name)
name
- New tag nameXmlTag.setName(String)
public final void setNamespace(java.lang.String namespace)
namespace
- New tag name namespaceXmlTag.setNamespace(String)
public final void setOpenTag(ComponentTag tag)
tag
- the open-tag
java.lang.RuntimeException
- if 'this' is not a close tagpublic final void setType(XmlTag.Type type)
type
- The new typepublic final java.lang.CharSequence syntheticCloseTagString()
public java.lang.CharSequence toCharSequence()
toCharSequence
in class MarkupElement
MarkupElement.toCharSequence()
public final java.lang.String toString()
toString
in class java.lang.Object
public final void writeOutput(Response response, boolean stripWicketAttributes, java.lang.String namespace)
response
- The response to write tostripWicketAttributes
- if true, wicket:id are removed from outputnamespace
- Wicket's namespace to usepublic final java.lang.String toUserDebugString()
toUserDebugString
in class MarkupElement
public final void setModified(boolean modified)
modified
- public final boolean isModified()
public java.lang.String getPath()
public boolean hasNoCloseTag()
public void setHasNoCloseTag(boolean hasNoCloseTag)
hasNoCloseTag
- public java.lang.Class getMarkupClass()
public void setMarkupClass(java.lang.Class wicketHeaderClass)
wicketHeaderClass
- wicketHeaderClasspublic boolean equalTo(MarkupElement element)
MarkupElement
equalTo
in class MarkupElement
element
- The markup element to compare with
MarkupElement.equalTo(org.apache.wicket.markup.MarkupElement)
public boolean isIgnore()
public void setIgnore(boolean ignore)
ignore
- If true than MarkupParser will remove it from the markuppublic boolean isAutoComponentTag()
public void setAutoComponentTag(boolean auto)
auto
- True, if wicket:id has been automatically created (internal component)public java.lang.Object getUserData(java.lang.String key)
key
- The key to store and retrieve the value
public void setUserData(java.lang.String key, java.lang.Object value)
key
- The key to store and retrieve the valuevalue
- The user specific value to store
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |