|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Tag
Tags are Java classes implementing JSP Tag extensions. The class must have a null argument public constructor and implement the tag attribute as setXXX methods, following the Beans spec.
MyTag tag = new MyTag(); tag.setPageContext(page); tag.setParent(...); tag.setFoo(...); tag.setBar(...); if (tag.doStartTag() == EVAL_BODY_INCLUDE) { ... } if (tag.doEndTag() == SKIP_PAGE) return; ... tag.setParent(...); tag.setFoo(...); if (tag.doStartTag() == EVAL_BODY_INCLUDE) { ... } if (tag.doEndTag() == SKIP_PAGE) return; ... tag.release();
| Field Summary | |
|---|---|
static int |
EVAL_BODY_INCLUDE
|
static int |
EVAL_PAGE
|
static int |
SKIP_BODY
|
static int |
SKIP_PAGE
|
| Method Summary | |
|---|---|
int |
doEndTag()
Callback to handle the end of a tag. |
int |
doStartTag()
Callback to handle the start of a tag. |
Tag |
getParent()
Returns the containing tag. |
void |
release()
Cleans up the tag at the end of the page. |
void |
setPageContext(PageContext page)
Sets the page context of this page. |
void |
setParent(Tag t)
Sets the containing tag. |
| Field Detail |
|---|
static final int SKIP_BODY
static final int EVAL_BODY_INCLUDE
static final int SKIP_PAGE
static final int EVAL_PAGE
| Method Detail |
|---|
void setPageContext(PageContext page)
void setParent(Tag t)
Tag getParent()
int doStartTag()
throws JspException
doStartTag can assume setPageContext,
setParent, and all tag attribute properties have
been called.
JspException
int doEndTag()
throws JspException
JspExceptionvoid release()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||