|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement
public class TagDisplayElement
This class displays a Tag. On construction, it merely stores the Tag data, and waits until execution time to create the tag. This is a framework only class and should not be used by external developers.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_TAG_LIB_NAME
This is the default tag library name used when a tag does not specify a library name. |
static char |
LIBRARY_SEPARATOR
This is the separator used between library and tag names. |
protected CompositeDisplayElement |
m_ChildElements
|
protected java.lang.Object[][] |
m_ObjXML
|
protected CompositeDisplayElement |
m_ParentContainer
|
protected java.lang.String |
m_strErrorMessage
|
protected java.lang.String |
m_strLibraryName
|
protected java.lang.String |
m_strTagName
|
protected ATag |
m_Tag
|
Constructor Summary | |
---|---|
TagDisplayElement(java.lang.Object[][] _objXML,
CompositeDisplayElement _parentContainer)
Construct the Display Element, but do not construct the Tag until it is actually required. |
Method Summary | |
---|---|
protected void |
CalculateTagName()
This calculates the tag and library name, if they have not already been calculated. |
protected void |
CleanupTag(TagVisitor _tagVisitor)
This cleans up the tag to make sure it is in the proper state. |
HTMLElement |
Display(TagVisitor _tagVisitor)
Displays this element and it's child elements and returns the result. |
protected HTMLElement |
DisplayAsHTML(TagVisitor _tagVisitor)
Output the current tag as HTML. |
CompositeDisplayElement |
GetChildElements(CompositeDisplayElement _parent)
This returns a CompositeDisplayElement to be used to contain the children of this tag. |
protected HTMLElement |
GetEndComment()
Generate the end comment for debug mode. |
protected HTMLElement |
GetStartComment()
Generate the start comment for debug mode. |
java.lang.String |
GetTagLibraryName()
This method gets the name of the library for this tag. |
java.lang.String |
GetTagName()
This method gets the name of this tag. |
boolean |
HasChildElements(ITagMetaData[] _childTags,
java.lang.Object[] _results,
TagLibraryMetaData _library,
int _nCurrentDepth)
This method searches for child tags of the current tag and fills in the results array with an Object if the tag has been found. |
boolean |
HasChildTags(ITagMetaData[] _childTags,
java.lang.Object[] _results,
TagLibraryMetaData _library,
int _nCurrentDepth)
This method checks if the current tag has the requested tags as child tags. |
int |
HasParentElement(ITagMetaData _parentTag,
TagLibraryMetaData _library)
This method searches for a parent tag of the current tag. |
int |
HasParentTag(ITagMetaData _parentTag,
TagLibraryMetaData _library)
This method checks if the current tag has the requested tag as a parent tag. |
protected void |
InitializeTag(TagVisitor _tagVisitor)
This initializes the Tag with the data it needs to execute. |
void |
Release()
This method is called to release any data that needs special handling before being allowed to go out of scope. |
void |
SetErrorMessage(java.lang.String _strError)
This method sets an error to be displayed in an HTML Comment before the tag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_TAG_LIB_NAME
public static final char LIBRARY_SEPARATOR
protected java.lang.Object[][] m_ObjXML
protected ATag m_Tag
protected java.lang.String m_strTagName
protected java.lang.String m_strLibraryName
protected CompositeDisplayElement m_ParentContainer
protected CompositeDisplayElement m_ChildElements
protected java.lang.String m_strErrorMessage
Constructor Detail |
---|
public TagDisplayElement(java.lang.Object[][] _objXML, CompositeDisplayElement _parentContainer)
Object[][]
- _ObjXML The tag data.CompositeDisplayElement
- The parent container element
that this tag element is stored in.Method Detail |
---|
public HTMLElement Display(TagVisitor _tagVisitor)
IDisplayElement
Display
in interface IDisplayElement
IDisplayElement.Display(TagVisitor)
public void Release()
IDisplayElement
Release
in interface IDisplayElement
IDisplayElement.Release()
protected void CalculateTagName()
protected void InitializeTag(TagVisitor _tagVisitor)
_tagVisitor
- The Tag Visitor objectprotected void CleanupTag(TagVisitor _tagVisitor)
public CompositeDisplayElement GetChildElements(CompositeDisplayElement _parent)
_parent
- The parent of the current tag
protected HTMLElement GetStartComment()
protected HTMLElement GetEndComment()
public boolean HasChildElements(ITagMetaData[] _childTags, java.lang.Object[] _results, TagLibraryMetaData _library, int _nCurrentDepth)
IDisplayElement
HasChildElements
in interface IDisplayElement
_childTags
- An array of ITagMetaData objects for each child
tag to search for._results
- An array of null Objects. On execution, when a child
tag is found, the location in the _results array that corresponds to
the location of the tag in the _ChildTags array will be filled in with an
Integer containing the positive depth of the child tag._library
- The Tag Library of the tags to look for._nCurrentDepth
- The depth of the current tag.
IDisplayElement.HasChildElements(ITagMetaData[], Object[], TagLibraryMetaData, int)
public boolean HasChildTags(ITagMetaData[] _childTags, java.lang.Object[] _results, TagLibraryMetaData _library, int _nCurrentDepth)
_childTags
- An array of ITagMetaData objects for each child
tag to search for._results
- An array of null Objects. After execution, child
tags that have been found that will be replaced with Integer objects
containing the positive depth of the child tag in the same location
the tag is in the _ChildTags array._library
- The Tag Library of the tags to look for._nCurrentDepth
- The depth of the current tag.
public int HasParentElement(ITagMetaData _parentTag, TagLibraryMetaData _library)
IDisplayElement
HasParentElement
in interface IDisplayElement
_library
- The Tag Library of the tag to look for.
IDisplayElement.HasParentElement(ITagMetaData, TagLibraryMetaData)
public int HasParentTag(ITagMetaData _parentTag, TagLibraryMetaData _library)
_ParentTag
- The ITagMetaData of the tag to look for._library
- The Tag Library of the tag to look for.
public java.lang.String GetTagName()
public java.lang.String GetTagLibraryName()
public void SetErrorMessage(java.lang.String _strError)
_strError
- The error message to be displayed. This does
not need to have the HTML comment marks (i.e. ).protected HTMLElement DisplayAsHTML(TagVisitor _tagVisitor)
_tagVisitor
- The tag visitor.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |