org.sf.charttaglibs
Class BaseHandlerTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.sf.charttaglibs.BaseHandlerTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
BaseChartTag

public abstract class BaseHandlerTag
extends javax.servlet.jsp.tagext.BodyTagSupport

Base class for tags that render form elements capable of including JavaScript event handlers and the common html tags. This class does not implement the doStartTag() or doEndTag() methods. Subclasses should provide appropriate implementations of these.

See Also:
Serialized Form

Field Summary
protected  java.lang.String align
          The property to specify where to align the image.
private  java.lang.String alt
          The alternate text of this element.
protected  java.lang.String border
          The border size around the image.
protected  java.lang.String height
          The image height.
protected  java.lang.String hspace
          The horizontal spacing around the image.
protected  java.lang.String ismap
          Server-side image map declaration.
protected static Message messages
          The message resources for this package.
protected  java.lang.String name
          The JSP bean name for query parameters.
private  java.lang.String onabort
          Component has received abort event.
private  java.lang.String onblur
          Component lost focus event.
private  java.lang.String onclick
          Mouse click event.
private  java.lang.String onerror
          Component has received error event.
private  java.lang.String onfocus
          Component has received focus event.
private  java.lang.String onload
          Component has received load event.
protected  java.lang.String vspace
          The vertical spacing around the image.
protected  java.lang.String width
          The image width.
private  boolean xhtml
           
 
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
BaseHandlerTag()
           
 
Method Summary
 java.lang.String getAlign()
           
 java.lang.String getAlt()
           
 java.lang.String getBorder()
           
protected  java.lang.String getElementClose()
          Returns the closing brace for an input element depending on xhtml status.
 java.lang.String getHeight()
           
 java.lang.String getHspace()
           
 java.lang.String getIsmap()
           
 java.lang.String getName()
           
 java.lang.String getOnabort()
           
 java.lang.String getOnblur()
           
 java.lang.String getOnclick()
           
 java.lang.String getOnerror()
           
 java.lang.String getOnfocus()
           
 java.lang.String getOnload()
           
 java.lang.String getVspace()
           
 java.lang.String getWidth()
           
protected  boolean isXhtml()
          Allows HTML tags to find out if they're nested within an %lt;html:html> tag that has xhtml set to true.
protected  java.lang.String lookupProperty(java.lang.String beanName, java.lang.String property)
          Searches all scopes for the bean and calls BeanUtils.getProperty() with the given arguments and converts any exceptions into JspException.
protected  void prepareAttribute(java.lang.StringBuffer handlers, java.lang.String name, java.lang.Object value)
          Prepares an attribute if the value is not null, appending it to the the given StringBuffer.
protected  java.lang.String prepareHtmlElements()
          Prepares the html attributes for inclusion in the component's HTML tag.
protected  java.lang.String prepareJavaScriptsEvent()
          Prepares the JavaScript event for inclusion in the component's HTML tag.
protected  void prepareOtherAttributes(java.lang.StringBuffer handlers)
          'Hook' to enable tags to be extended and additional attributes added.
 void release()
          Release any acquired resources.
 void setAlign(java.lang.String align)
           
 void setAlt(java.lang.String alt)
           
 void setBorder(java.lang.String border)
           
 void setHeight(java.lang.String height)
           
 void setHspace(java.lang.String hspace)
           
 void setIsmap(java.lang.String ismap)
           
 void setName(java.lang.String name)
           
 void setOnabort(java.lang.String onabort)
           
 void setOnblur(java.lang.String onblur)
           
 void setOnclick(java.lang.String onclick)
           
 void setOnerror(java.lang.String onerror)
           
 void setOnfocus(java.lang.String onfocus)
           
 void setOnload(java.lang.String onload)
           
 void setVspace(java.lang.String vspace)
           
 void setWidth(java.lang.String width)
           
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, doStartTag, 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

messages

protected static Message messages
The message resources for this package.


alt

private java.lang.String alt
The alternate text of this element.


align

protected java.lang.String align
The property to specify where to align the image.


border

protected java.lang.String border
The border size around the image.


height

protected java.lang.String height
The image height.


hspace

protected java.lang.String hspace
The horizontal spacing around the image.


ismap

protected java.lang.String ismap
Server-side image map declaration.


name

protected java.lang.String name
The JSP bean name for query parameters.


vspace

protected java.lang.String vspace
The vertical spacing around the image.


width

protected java.lang.String width
The image width.


onclick

private java.lang.String onclick
Mouse click event.


onblur

private java.lang.String onblur
Component lost focus event.


onfocus

private java.lang.String onfocus
Component has received focus event.


onabort

private java.lang.String onabort
Component has received abort event.


onerror

private java.lang.String onerror
Component has received error event.


onload

private java.lang.String onload
Component has received load event.


xhtml

private boolean xhtml
Constructor Detail

BaseHandlerTag

public BaseHandlerTag()
Method Detail

release

public void release()
Release any acquired resources.


prepareHtmlElements

protected java.lang.String prepareHtmlElements()
                                        throws javax.servlet.jsp.JspException
Prepares the html attributes for inclusion in the component's HTML tag.

Returns:
The prepared String for inclusion in the HTML tag.
Throws:
javax.servlet.jsp.JspException - if invalid attributes are specified

prepareJavaScriptsEvent

protected java.lang.String prepareJavaScriptsEvent()
Prepares the JavaScript event for inclusion in the component's HTML tag.

Returns:
The prepared String for inclusion in the HTML tag.

prepareOtherAttributes

protected void prepareOtherAttributes(java.lang.StringBuffer handlers)
'Hook' to enable tags to be extended and additional attributes added.

Parameters:
handlers - The StringBuffer that output will be appended to.

prepareAttribute

protected void prepareAttribute(java.lang.StringBuffer handlers,
                                java.lang.String name,
                                java.lang.Object value)
Prepares an attribute if the value is not null, appending it to the the given StringBuffer.

Parameters:
handlers - The StringBuffer that output will be appended to.

isXhtml

protected boolean isXhtml()
Allows HTML tags to find out if they're nested within an %lt;html:html> tag that has xhtml set to true.

Returns:
true if the tag is nested within an html tag with xhtml set to true, false otherwise.

getElementClose

protected java.lang.String getElementClose()
Returns the closing brace for an input element depending on xhtml status. The tag must be nested within an %lt;html:html> tag that has xhtml set to true.

Returns:
String - > if xhtml is false, /> if xhtml is true

lookupProperty

protected java.lang.String lookupProperty(java.lang.String beanName,
                                          java.lang.String property)
                                   throws javax.servlet.jsp.JspException
Searches all scopes for the bean and calls BeanUtils.getProperty() with the given arguments and converts any exceptions into JspException.

Parameters:
beanName - The name of the object to get the property from.
property - The name of the property to get.
Returns:
The value of the property.
Throws:
javax.servlet.jsp.JspException

getAlign

public java.lang.String getAlign()

setAlign

public void setAlign(java.lang.String align)

getAlt

public java.lang.String getAlt()

setAlt

public void setAlt(java.lang.String alt)

getBorder

public java.lang.String getBorder()

setBorder

public void setBorder(java.lang.String border)

getHeight

public java.lang.String getHeight()

setHeight

public void setHeight(java.lang.String height)

getHspace

public java.lang.String getHspace()

setHspace

public void setHspace(java.lang.String hspace)

getIsmap

public java.lang.String getIsmap()

setIsmap

public void setIsmap(java.lang.String ismap)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getOnabort

public java.lang.String getOnabort()

setOnabort

public void setOnabort(java.lang.String onabort)

getOnblur

public java.lang.String getOnblur()

setOnblur

public void setOnblur(java.lang.String onblur)

getOnclick

public java.lang.String getOnclick()

setOnclick

public void setOnclick(java.lang.String onclick)

getOnerror

public java.lang.String getOnerror()

setOnerror

public void setOnerror(java.lang.String onerror)

getOnfocus

public java.lang.String getOnfocus()

setOnfocus

public void setOnfocus(java.lang.String onfocus)

getOnload

public java.lang.String getOnload()

setOnload

public void setOnload(java.lang.String onload)

getVspace

public java.lang.String getVspace()

setVspace

public void setVspace(java.lang.String vspace)

getWidth

public java.lang.String getWidth()

setWidth

public void setWidth(java.lang.String width)