|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.ujac.web.tag.BaseTag
public abstract class BaseTag
Name: BaseTag
Description: Base JSP custom tag implementation which provides a smart way to render attributes for generated HTML tags.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
The log writer. |
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
bodyContent |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
BaseTag()
|
Method Summary | |
---|---|
void |
clearTagAttributes()
Removes all tag attributes. |
int |
doStartTag()
|
protected Tag |
getParent(Class parentClass)
Gets the parent tag that matches the given class. |
String |
getTagAttribute(String name)
Gets an tag attribute parameter. |
Map |
getTagAttributes()
Getter method for the the property tagAttributes. |
TemplateContext |
getTemplateContext()
Gets the template context. |
void |
release()
|
void |
removeTagAttribute(String name)
Removes an tag attribute. |
Object |
setAttribute(String key,
Object value)
Sets an attribute, both in template context and request. |
void |
setTagAttribute(String name,
String url)
Sets an tag attribute. |
protected void |
writeAttributes(PageContext ctx,
JspWriter writer)
Writes the given attributes to the JSP writer. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
---|
getParent, setPageContext, setParent |
Field Detail |
---|
protected org.apache.commons.logging.Log log
Constructor Detail |
---|
public BaseTag()
Method Detail |
---|
protected void writeAttributes(PageContext ctx, JspWriter writer) throws IOException
ctx
- The page context.writer
- The JSP writer to output to.
IOException
- In case the JSP output failed.public Map getTagAttributes()
public String getTagAttribute(String name)
name
- The name of the tag attribute to get.
public void setTagAttribute(String name, String url)
name
- The name of the tag attribute.url
- the action link.public void removeTagAttribute(String name)
name
- The name of the tag attribute.public void clearTagAttributes()
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class BodyTagSupport
JspException
Tag.doStartTag()
public void release()
release
in interface Tag
release
in class BodyTagSupport
BodyTagSupport.release()
protected Tag getParent(Class parentClass)
parentClass
- The class of the desrired parent tag.
public TemplateContext getTemplateContext()
getTemplateContext
in interface TemplateContextHolder
public Object setAttribute(String key, Object value)
key
- The attribute key.value
- The attribute value to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |