|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.tag.StripesTagSupport
net.sourceforge.stripes.tag.HtmlTagSupport
public abstract class HtmlTagSupport
Provides basic facilities for any tag that wishes to mimic a standard HTML/XHTML tag. Includes getters and setters for all basic HTML attributes and JavaScript event attributes. Also includes several of the support methods from the Tag interface, but does not directly or indirectly implement either Tag or BodyTag.
Field Summary |
---|
Fields inherited from class net.sourceforge.stripes.tag.StripesTagSupport |
---|
pageContext, parentTag |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
HtmlTagSupport()
|
Method Summary | ||
---|---|---|
protected
|
evaluateExpression(String expression,
Class<R> resultType)
Evaluates a single expression and returns the result. |
|
protected String |
get(String name)
Gets the value of the named attribute, or null if it is not set. |
|
String |
getAccesskey()
|
|
protected Map<String,String> |
getAttributes()
Gets the map containing the attributes of the tag. |
|
BodyContent |
getBodyContent()
Returns the BodyContent of the tag if one has been provided by the JSP container. |
|
protected String |
getBodyContentAsString()
Checks to see if there is a body content for this tag, and if its value is non-null and non-zero-length. |
|
String |
getCssClass()
|
|
String |
getDir()
|
|
String |
getId()
|
|
String |
getLang()
|
|
String |
getOnblur()
|
|
String |
getOnchange()
|
|
String |
getOnclick()
|
|
String |
getOndblclick()
|
|
String |
getOnfocus()
|
|
String |
getOnkeydown()
|
|
String |
getOnkeypress()
|
|
String |
getOnkeyup()
|
|
String |
getOnmousedown()
|
|
String |
getOnmousemove()
|
|
String |
getOnmouseout()
|
|
String |
getOnmouseover()
|
|
String |
getOnmouseup()
|
|
String |
getOnselect()
|
|
String |
getStyle()
|
|
String |
getTabindex()
|
|
String |
getTitle()
|
|
void |
release()
Release method to clean up the state of the tag ready for re-use. |
|
protected void |
set(String name,
String value)
Sets the named attribute to the supplied value. |
|
void |
setAccesskey(String accesskey)
|
|
void |
setBodyContent(BodyContent bodyContent)
Called by the JSP container to set the BodyContent on the tag. |
|
void |
setClass(String cssClass)
|
|
void |
setCssClass(String cssClass)
|
|
void |
setDir(String dir)
|
|
void |
setDynamicAttribute(String uri,
String name,
Object value)
Accepts any dynamic attributes that are supplied to the tag and stored them in the map of attributes that get written back to the page. |
|
void |
setId(String id)
|
|
void |
setLang(String lang)
|
|
void |
setOnblur(String onblur)
|
|
void |
setOnchange(String onchange)
|
|
void |
setOnclick(String onclick)
|
|
void |
setOndblclick(String ondblclick)
|
|
void |
setOnfocus(String onfocus)
|
|
void |
setOnkeydown(String onkeydown)
|
|
void |
setOnkeypress(String onkeypress)
|
|
void |
setOnkeyup(String onkeyup)
|
|
void |
setOnmousedown(String onmousedown)
|
|
void |
setOnmousemove(String onmousemove)
|
|
void |
setOnmouseout(String onmouseout)
|
|
void |
setOnmouseover(String onmouseover)
|
|
void |
setOnmouseup(String onmouseup)
|
|
void |
setOnselect(String onselect)
|
|
void |
setStyle(String style)
|
|
void |
setTabindex(String tabindex)
|
|
void |
setTitle(String title)
|
|
String |
toString()
Returns a String representation of the class, including the map of attributes that are set on the tag, the toString of its parent tag, and the pageContext. |
|
protected void |
writeAttributes(JspWriter writer)
For every attribute stored in the attributes map for this tag, writes out the tag attributes in the form x="y". |
|
protected void |
writeCloseTag(JspWriter writer,
String tag)
Writes out a close tag using the tag name supplied. |
|
protected void |
writeOpenTag(JspWriter writer,
String tag)
Writes out an opening tag. |
|
protected void |
writeSingletonTag(JspWriter writer,
String tag)
Writes out a singleton tag (aka a bodiless tag or self-closing tag). |
Methods inherited from class net.sourceforge.stripes.tag.StripesTagSupport |
---|
doEndTag, doStartTag, getActionBeanType, getActionBeanUrl, getPageContext, getParent, getParentTag, getTagStack, popPageContextAttributes, pushPageContextAttributes, setPageContext, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HtmlTagSupport()
Method Detail |
---|
protected final void set(String name, String value)
protected final String get(String name)
protected final Map<String,String> getAttributes()
public void setDynamicAttribute(String uri, String name, Object value) throws JspException
setDynamicAttribute
in interface DynamicAttributes
uri
- the URI of the namespace of the attribute if it has one. Totally ignored!name
- the name of the attributevalue
- the value of the attribute
JspException
- not thrown from this class; included so that subclasses can
override the method and throw the interface exceptionpublic BodyContent getBodyContent()
public void setBodyContent(BodyContent bodyContent)
public void release()
release
in interface Tag
release
in class StripesTagSupport
protected String getBodyContentAsString()
protected void writeOpenTag(JspWriter writer, String tag) throws JspException
writer
- the JspWriter to write the open tag totag
- the name of the tag to use
JspException
- if the JspWriter causes an exceptionprotected void writeCloseTag(JspWriter writer, String tag) throws JspException
writer
- the JspWriter to write the open tag totag
- the name of the tag to use
JspException
- if the JspWriter causes an exceptionprotected void writeSingletonTag(JspWriter writer, String tag) throws JspException
writer
- the JspWriter to write the open tag totag
- the name of the tag to use
JspException
- if the JspWriter causes an exceptionprotected void writeAttributes(JspWriter writer) throws IOException
writer
- the JspWriter to write the open tag to
IOException
- if the JspWriter causes an exceptionprotected <R> R evaluateExpression(String expression, Class<R> resultType) throws StripesJspException
expression
- the expression to be evaluatedresultType
- the Class representing the desired return type from the expression
StripesJspException
- when an ELException occurs trying to evaluate the expressionpublic String toString()
toString
in class Object
public void setId(String id)
public String getId()
public void setClass(String cssClass)
public void setCssClass(String cssClass)
public String getCssClass()
public void setTitle(String title)
public String getTitle()
public void setStyle(String style)
public String getStyle()
public void setDir(String dir)
public String getDir()
public void setLang(String lang)
public String getLang()
public void setTabindex(String tabindex)
public String getTabindex()
public void setAccesskey(String accesskey)
public String getAccesskey()
public void setOnfocus(String onfocus)
public String getOnfocus()
public void setOnblur(String onblur)
public String getOnblur()
public void setOnselect(String onselect)
public String getOnselect()
public void setOnchange(String onchange)
public String getOnchange()
public void setOnclick(String onclick)
public String getOnclick()
public void setOndblclick(String ondblclick)
public String getOndblclick()
public void setOnmousedown(String onmousedown)
public String getOnmousedown()
public void setOnmouseup(String onmouseup)
public String getOnmouseup()
public void setOnmouseover(String onmouseover)
public String getOnmouseover()
public void setOnmousemove(String onmousemove)
public String getOnmousemove()
public void setOnmouseout(String onmouseout)
public String getOnmouseout()
public void setOnkeypress(String onkeypress)
public String getOnkeypress()
public void setOnkeydown(String onkeydown)
public String getOnkeydown()
public void setOnkeyup(String onkeyup)
public String getOnkeyup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |