org.apache.struts.taglib.html
Class ImgTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.apache.struts.taglib.html.BaseHandlerTag
              extended by org.apache.struts.taglib.html.ImgTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, Tag
Direct Known Subclasses:
ELImgTag, NestedImgTag

public class ImgTag
extends BaseHandlerTag

Generate an IMG tag to the specified image URI.

TODO:

Version:
$Rev: 552353 $
See Also:
Serialized Form

Field Summary
protected  String action
          The module-relative action (beginning with a slash) which will be used as the source for this image.
protected  String align
          The property to specify where to align the image.
protected  String border
          The border size around the image.
protected  String height
          The image height.
protected  String hspace
          The horizontal spacing around the image.
protected  String imageName
          The image name for named images.
protected  String ismap
          Server-side image map declaration.
protected static MessageResources messages
          The message resources for this package.
protected  String module
          The module prefix (beginning with a slash) which will be used to find the action for this link.
protected  String name
          The JSP bean name for query parameters.
protected  String page
          The module-relative path, starting with a slash character, of the image to be displayed by this rendered tag.
protected  String pageKey
          The message resources key under which we should look up the page attribute for this generated tag, if any.
protected  String paramId
          In situations where an image is dynamically generated (such as to create a chart graph), this specifies the single-parameter request parameter name to generate.
protected  String paramName
          The single-parameter JSP bean name.
protected  String paramProperty
          The single-parameter JSP bean property.
protected  String paramScope
          The single-parameter JSP bean scope.
protected  String property
          The JSP bean property name for query parameters.
protected  String scope
          The scope of the bean specified by the name property, if any.
protected  String src
          The image source URI.
protected  String srcKey
          The message resources key under which we should look up the src attribute for this generated tag, if any.
protected  boolean useLocalEncoding
           
protected  String usemap
          Client-side image map declaration.
protected  String vspace
          The vertical spacing around the image.
protected  String width
          The image width.
 
Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag
accesskey, doDisabled, doReadonly, indexed, tabindex
 
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
ImgTag()
           
 
Method Summary
 int doEndTag()
          Render the end of the IMG tag.
 int doStartTag()
          Render the beginning of the IMG tag.
 String getAction()
           
 String getAlign()
           
 String getBorder()
           
 String getHeight()
           
 String getHspace()
           
 String getImageName()
           
 String getIsmap()
           
 String getModule()
           
 String getName()
           
 String getPage()
           
 String getPageKey()
           
 String getParamId()
           
 String getParamName()
           
 String getParamProperty()
           
 String getParamScope()
           
 String getProperty()
           
 String getScope()
           
 String getSrc()
           
 String getSrcKey()
           
 String getUsemap()
           
 String getVspace()
           
 String getWidth()
           
 boolean isUseLocalEncoding()
           
 void release()
          Release any acquired resources.
 void setAction(String action)
           
 void setAlign(String align)
           
 void setBorder(String border)
           
 void setHeight(String height)
           
 void setHspace(String hspace)
           
 void setImageName(String imageName)
           
 void setIsmap(String ismap)
           
 void setModule(String module)
           
 void setName(String name)
           
 void setPage(String page)
           
 void setPageKey(String pageKey)
           
 void setParamId(String paramId)
           
 void setParamName(String paramName)
           
 void setParamProperty(String paramProperty)
           
 void setParamScope(String paramScope)
           
 void setProperty(String property)
           
 void setScope(String scope)
           
 void setSrc(String src)
           
 void setSrcKey(String srcKey)
           
 void setUseLocalEncoding(boolean b)
           
 void setUsemap(String usemap)
           
 void setVspace(String vspace)
           
 void setWidth(String width)
           
protected  String src()
          Return the base source URL that will be rendered in the src property for this generated element, or null if there is no such URL.
protected  String url(String url)
          Return the specified src URL, modified as necessary with optional request parameters.
 
Methods inherited from class org.apache.struts.taglib.html.BaseHandlerTag
doErrorsExist, getAccesskey, getAlt, getAltKey, getBundle, getDir, getDisabled, getElementClose, getErrorKey, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexed, getIndexValue, getLang, getLocale, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getReadonly, getStyle, getStyleClass, getStyleId, getTabindex, getTitle, getTitleKey, isXhtml, lookupProperty, message, prepareAttribute, prepareEventHandlers, prepareFocusEvents, prepareIndex, prepareInternationalization, prepareKeyEvents, prepareMouseEvents, prepareName, prepareOtherAttributes, prepareStyles, prepareTextEvents, setAccesskey, setAlt, setAltKey, setBundle, setDir, setDisabled, setErrorKey, setErrorStyle, setErrorStyleClass, setErrorStyleId, setIndexed, setLang, setLocale, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle, setTitleKey
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, 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

messages

protected static MessageResources messages
The message resources for this package.


align

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


border

protected String border
The border size around the image.


height

protected String height
The image height.


hspace

protected String hspace
The horizontal spacing around the image.


imageName

protected String imageName
The image name for named images.


ismap

protected String ismap
Server-side image map declaration.


name

protected String name
The JSP bean name for query parameters.


page

protected String page
The module-relative path, starting with a slash character, of the image to be displayed by this rendered tag.


pageKey

protected String pageKey
The message resources key under which we should look up the page attribute for this generated tag, if any.


action

protected String action
The module-relative action (beginning with a slash) which will be used as the source for this image.


module

protected String module
The module prefix (beginning with a slash) which will be used to find the action for this link.


paramId

protected String paramId
In situations where an image is dynamically generated (such as to create a chart graph), this specifies the single-parameter request parameter name to generate.


paramName

protected String paramName
The single-parameter JSP bean name.


paramProperty

protected String paramProperty
The single-parameter JSP bean property.


paramScope

protected String paramScope
The single-parameter JSP bean scope.


property

protected String property
The JSP bean property name for query parameters.


scope

protected String scope
The scope of the bean specified by the name property, if any.


src

protected String src
The image source URI.


srcKey

protected String srcKey
The message resources key under which we should look up the src attribute for this generated tag, if any.


usemap

protected String usemap
Client-side image map declaration.


vspace

protected String vspace
The vertical spacing around the image.


width

protected String width
The image width.


useLocalEncoding

protected boolean useLocalEncoding
Constructor Detail

ImgTag

public ImgTag()
Method Detail

getAlign

public String getAlign()

setAlign

public void setAlign(String align)

getBorder

public String getBorder()

setBorder

public void setBorder(String border)

getHeight

public String getHeight()

setHeight

public void setHeight(String height)

getHspace

public String getHspace()

setHspace

public void setHspace(String hspace)

getImageName

public String getImageName()

setImageName

public void setImageName(String imageName)

getIsmap

public String getIsmap()

setIsmap

public void setIsmap(String ismap)

getName

public String getName()

setName

public void setName(String name)

getPage

public String getPage()

setPage

public void setPage(String page)

getPageKey

public String getPageKey()

setPageKey

public void setPageKey(String pageKey)

getAction

public String getAction()

setAction

public void setAction(String action)

getModule

public String getModule()

setModule

public void setModule(String module)

getParamId

public String getParamId()

setParamId

public void setParamId(String paramId)

getParamName

public String getParamName()

setParamName

public void setParamName(String paramName)

getParamProperty

public String getParamProperty()

setParamProperty

public void setParamProperty(String paramProperty)

getParamScope

public String getParamScope()

setParamScope

public void setParamScope(String paramScope)

getProperty

public String getProperty()

setProperty

public void setProperty(String property)

getScope

public String getScope()

setScope

public void setScope(String scope)

getSrc

public String getSrc()

setSrc

public void setSrc(String src)

getSrcKey

public String getSrcKey()

setSrcKey

public void setSrcKey(String srcKey)

getUsemap

public String getUsemap()

setUsemap

public void setUsemap(String usemap)

getVspace

public String getVspace()

setVspace

public void setVspace(String vspace)

getWidth

public String getWidth()

setWidth

public void setWidth(String width)

isUseLocalEncoding

public boolean isUseLocalEncoding()

setUseLocalEncoding

public void setUseLocalEncoding(boolean b)

doStartTag

public int doStartTag()
               throws JspException
Render the beginning of the IMG tag.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws JspException
Render the end of the IMG tag.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class BodyTagSupport
Throws:
JspException - if a JSP exception has occurred

release

public void release()
Release any acquired resources.

Specified by:
release in interface Tag
Overrides:
release in class BaseHandlerTag

src

protected String src()
              throws JspException
Return the base source URL that will be rendered in the src property for this generated element, or null if there is no such URL.

Throws:
JspException - if an error occurs

url

protected String url(String url)
              throws JspException
Return the specified src URL, modified as necessary with optional request parameters.

Parameters:
url - The URL to be modified (or null if this url will not be used)
Throws:
JspException - if an error occurs preparing the URL


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.