net.sourceforge.stripes.tag
Class InputImageTag
java.lang.Object
net.sourceforge.stripes.tag.StripesTagSupport
net.sourceforge.stripes.tag.HtmlTagSupport
net.sourceforge.stripes.tag.InputTagSupport
net.sourceforge.stripes.tag.InputImageTag
- All Implemented Interfaces:
- DynamicAttributes, JspTag, Tag, TryCatchFinally
public class InputImageTag
- extends InputTagSupport
Tag class that generates an image button for use in HTML forms, e.g:
<input name="foo" type="image" src="/app/foo.gif" alt="foo"/>
Provides a couple of facilities above and beyond using plain HTML tags. The main
advantage is a localization capability. The tag looks in the Stripes Field Name
message bundle for resources to be used as the src URL for the image and the alt
text of the image. In order it will look for and use:
- resource: actionPath.inputName.[src|alt]
- resource: inputName.[src|alt]
- tag attributes: src and alt
If localized values exist these are preferred over the values specified directly
on the tag.
Additionally if the 'src' URL (whether acquired from the tag attribute or the
resource bundle) starts with a slash, the tag will prepend the context path of the
web application.
- Since:
- Stripes 1.3
- Author:
- Tim Fennell
Constructor Summary |
InputImageTag()
Sets the tag's type to be an image input. |
Methods inherited from class net.sourceforge.stripes.tag.InputTagSupport |
doCatch, doEndTag, doFinally, doStartTag, format, format, getActionBean, getDisabled, getFieldErrors, getFormatPattern, getFormatType, getLocalizedFieldName, getLocalizedFieldName, getName, getOverrideValueOrValues, getParentFormTag, getReadonly, getSingleOverrideValue, getSize, getValidationMetadata, getValueOnPage, hasErrors, isItemSelected, loadErrors, makeFocused, registerWithParentForm, setDisabled, setFocus, setFormatPattern, setFormatType, setName, setReadonly, setSize |
Methods inherited from class net.sourceforge.stripes.tag.HtmlTagSupport |
evaluateExpression, get, getAccesskey, getAttributes, getBodyContent, getBodyContentAsString, getCssClass, getDir, getId, getLang, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getStyle, getTabindex, getTitle, release, set, setAccesskey, setBodyContent, setClass, setCssClass, setDir, setDynamicAttribute, setId, setLang, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setStyle, setTabindex, setTitle, toString, writeAttributes, writeCloseTag, writeOpenTag, writeSingletonTag |
InputImageTag
public InputImageTag()
- Sets the tag's type to be an image input.
doStartInputTag
public int doStartInputTag()
throws JspException
- Does nothing.
- Specified by:
doStartInputTag
in class InputTagSupport
- Returns:
- SKIP_BODY in all cases
- Throws:
JspException
doEndInputTag
public int doEndInputTag()
throws JspException
- Does the major work of the tag as described in the class level javadoc. Checks for
localized src and alt attributes and prepends the context path to any src URL that
starts with a slash.
- Specified by:
doEndInputTag
in class InputTagSupport
- Returns:
- EVAL_PAGE always
- Throws:
JspException
setAlign
public void setAlign(String align)
getAlign
public String getAlign()
setAlt
public void setAlt(String alt)
getAlt
public String getAlt()
setSrc
public void setSrc(String src)
getSrc
public String getSrc()
setValue
public void setValue(String value)
getValue
public String getValue()
? Copyright 2005-2006, Stripes Development Team.