|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.markup.MarkupElement
wicket.markup.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 | |
protected ComponentTag |
closes
Assuming this is a open (or open-close) tag, 'closes' refers to the ComponentTag which closes it. |
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(XmlTag tag)
Construct. |
|
| Method Summary | |
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. |
ValueMap |
getAttributes()
|
java.lang.String |
getId()
Get the tag's component id |
int |
getLength()
Gets the length of the tag in characters. |
java.lang.String |
getName()
|
boolean |
getNameChanged()
|
java.lang.String |
getNamespace()
|
ComponentTag |
getOpenTag()
If set, return the corresponding open tag (ComponentTag). |
int |
getPos()
|
java.lang.String |
getString(java.lang.String key)
|
XmlTag.Type |
getType()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
boolean |
isAutolinkEnabled()
True if autolink is enabled and the tag contains a href attribute. |
boolean |
isClose()
|
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,
int value)
|
void |
put(java.lang.String key,
java.lang.String 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 |
setId(java.lang.String id)
Set the component's id. |
void |
setName(java.lang.String name)
|
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. |
java.lang.String |
syntheticCloseTagString()
|
java.lang.String |
toString()
Converts this object to a string representation. |
java.lang.String |
toString(boolean stripWicketAttributes)
Converts this object to a string representation. |
java.lang.String |
toUserDebugString()
Converts this object to a string representation including useful information for debugging |
| 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 ComponentTag closes
protected final XmlTag xmlTag
| Constructor Detail |
public ComponentTag(XmlTag tag)
tag - The underlying xml tag| Method Detail |
public final boolean closes(MarkupElement open)
closes in class MarkupElementopen - The open tag
public void enableAutolink(boolean autolink)
autolink - enable/disable automatic href conversionpublic ValueMap getAttributes()
XmlTag.getAttributes()public java.lang.String getId()
public int getLength()
public java.lang.String getName()
XmlTag.getName()public boolean getNameChanged()
XmlTag.getNameChanged()public java.lang.String getNamespace()
XmlTag.getNamespace()public ComponentTag getOpenTag()
public int getPos()
XmlTag.getPos()public java.lang.String getString(java.lang.String key)
key - The key
XmlTag.getString(String)public XmlTag.Type getType()
XmlTag.getType()public boolean isAutolinkEnabled()
public boolean isClose()
XmlTag.isClose()public boolean isOpen()
XmlTag.isOpen()public boolean isOpen(java.lang.String id)
id - Required component id
XmlTag.isOpen()public boolean isOpenClose()
XmlTag.isOpenClose()public boolean isOpenClose(java.lang.String id)
id - Required component id
XmlTag.isOpenClose()public void makeImmutable()
public ComponentTag mutable()
public void put(java.lang.String key,
boolean value)
key - The keyvalue - The valueXmlTag.put(String, boolean)
public void put(java.lang.String key,
int value)
key - The keyvalue - The valueXmlTag.put(String, int)
public void put(java.lang.String key,
java.lang.String value)
key - The keyvalue - The valueXmlTag.put(String, String)
public void put(java.lang.String key,
StringValue value)
key - The keyvalue - The valueXmlTag.put(String, StringValue)public void putAll(java.util.Map map)
map - a key/value mapXmlTag.putAll(Map)public void remove(java.lang.String key)
key - The key to removeXmlTag.remove(String)public boolean requiresCloseTag()
public void setId(java.lang.String id)
id - The component's id assigned to the tag.public void setName(java.lang.String name)
name - New tag nameXmlTag.setName(String)public void setOpenTag(ComponentTag tag)
tag - the open-tag
java.lang.RuntimeException - if 'this' is not a close tagpublic void setType(XmlTag.Type type)
type - The new typepublic java.lang.String syntheticCloseTagString()
public java.lang.String toString()
public java.lang.String toString(boolean stripWicketAttributes)
stripWicketAttributes - If true, tag attributes with namespace
'wicket# will not be printed.
public java.lang.String toUserDebugString()
toUserDebugString in class MarkupElement
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||