|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.jsp.tagext.Tag
Actions in a Tag Library are defined through subclasses of Tag.
Field Summary | |
protected BodyJspWriter |
bodyOut
|
static int |
EVAL_BODY
Return value for doStartTag() and doAfterBody(): (re)evaluate the inner body of the tag. |
static int |
EVAL_PAGE
Return value for doEndTag(): continue evaluating the page |
protected PageContext |
pageContext
|
static int |
SKIP_BODY
Return value for doStartTag() and doAfterBody(): skip the inner body of the tag. |
static int |
SKIP_PAGE
Return value for doEndTag(): skip the remaining evaluation of the page |
protected TagData |
tagData
|
Constructor Summary | |
Tag(java.lang.String libraryPrefix,
java.lang.String tagName)
Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor. |
Method Summary | |
int |
doAfterBody()
Actions after some body has been evaluated. |
void |
doBeforeBody()
Actions before some body is to be evaluated. |
int |
doEndTag()
Process the end tag. |
int |
doStartTag()
Process the start tag for this instance. |
static Tag |
findAncestorWithClass(Tag from,
java.lang.Class klass)
Find the instance of a given class type that is closest to a given instance. |
protected BodyJspWriter |
getBodyOut()
|
java.lang.String |
getLibraryPrefix()
|
PageContext |
getPageContext()
return the PageContext for this tag |
Tag |
getParent()
|
protected JspWriter |
getPreviousOut()
|
TagData |
getTagData()
return the immmutable TagData for this tag |
java.lang.String |
getTagId()
|
java.lang.String |
getTagName()
|
java.lang.Object |
getValue(java.lang.String key)
|
void |
initialize(Tag parent,
TagData tagData,
PageContext pc)
Initialize a Tag instance so it can be (re)used. |
void |
release()
Release a Tag instance so it can be (re)used. |
void |
setBodyOut(BodyJspWriter b)
Set the BodyJspWriter. |
void |
setValue(java.lang.String key,
java.lang.Object value)
set a user defined value on 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 int EVAL_BODY
public static final int SKIP_BODY
public static final int EVAL_PAGE
public static final int SKIP_PAGE
protected BodyJspWriter bodyOut
protected PageContext pageContext
protected TagData tagData
Constructor Detail |
public Tag(java.lang.String libraryPrefix, java.lang.String tagName)
libraryPrefix
- The namespace prefix used for this library.
For example "jsp:".tagName
- The name of the element or yag, for example "useBean"Method Detail |
public static final Tag findAncestorWithClass(Tag from, java.lang.Class klass)
the
- subclass of Tag or interface to be matchedpublic void initialize(Tag parent, TagData tagData, PageContext pc)
Extreme care should be taken if this method is to be modified or interposed as it maintains invariants that are global to the whole page, specifically the parent Tag link list. initialize() is not frequently changed or interposed by the Tag author.
parent
- the parent extension tag for this tag or nulltagData
- attribute data for this tag instancepc
- PageContext for this tag instance.public void release()
Extreme care should be taken if this method is to be modified or interposed as it maintains invariants that are global to the whole page, specifically the parent Tag link list. initialize() is not frequently changed or interposed by the Tag author.
public int doStartTag() throws JspException
public int doEndTag() throws JspException
public void setBodyOut(BodyJspWriter b)
b
- the BodyJspWriterpublic void doBeforeBody() throws JspError
public int doAfterBody() throws JspError
public Tag getParent()
public java.lang.String getTagId()
public java.lang.String getLibraryPrefix()
public java.lang.String getTagName()
public TagData getTagData()
public PageContext getPageContext()
public void setValue(java.lang.String key, java.lang.Object value)
key
- the name of the user defined valuevalue
- the value to be associatedpublic java.lang.Object getValue(java.lang.String key)
protected final JspWriter getPreviousOut()
protected final BodyJspWriter getBodyOut()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |