|
|||||||||
| Home >> All >> com >> RuntimeCollective >> webapps >> [ tag overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.webapps.tag
Class ImageSubmitTag

java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.struts.taglib.html.BaseHandlerTag
com.RuntimeCollective.webapps.tag.SubmitTag
com.RuntimeCollective.webapps.tag.ImageSubmitTag
- 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
- public class ImageSubmitTag
- extends SubmitTag
A custom JSP tag that produces a submit button which uses an image rather than a button and behaves otherwise the same as SubmitTag, but also has all the same attributes as org.apache.struts.taglib.html.ImageTag Note this tag will not work if it sits next to a Struts html:submit tag. Convert other tags to rs:submit, to make sure it all works fine!
This tag takes the following attributes:
-
name- The name of the current form. [Mandatory]. -
src- The absolute url of the image file. [Optional]. -
srcKey- The key of the message resources string specifying the source URL of the image for this input tag. [Optional] -
page- The path to the image. The tag will make this context relative. [Optional] -
pageKey- The key of the message resources string specifying the context-relative path of the image for this input tag. [Optional] -
value- The value of property to submit. Defaults to property's current value. [Optional]. -
property- The property to be set to value. Defaults to "formAction". [Optional].
Note a javascript bug means that property must not be set to "submit" or "action". -
paramName- The name of a bean whose paramProperty will be appended to the value of the property to submit, with a blank space in front. [Optional]. -
paramProperty- The bean property which will be appended to the value of the property to submit, with a blank space in front. paramName must be set. Defaults to using the toString() value of paramBean. [Optional]. -
confirm- If this is set, then it will be used as the confirmation message in a popup window with 'OK/Cancel' buttons. The form will only be submitted if the user hits 'OK'. Defaults to "" (i.e. no confirmation required) [Optional]. -
htmlJSInput- You must set this to true if the form contains anhtmlJSInputtag [Optional]. -
alt- The alternate text for this image. [Optional] -
altKey- The message resources key of the alternate text for this image. [Optional] -
Border- The width (in pixels) of the border around this image. [Optional]
Note You cannot specify both src and srcKey.
Note - You cannot specify both page and pageKey.
Note - You'll need either a src/srcKey or page/pageKey attribute for this tag to work.
Note - You cannot specify both alt and altKey.
Note this tag must be used inside a form.
Examples:
<rs:imageSubmit name="lessonForm" src="http://imageServer/imageDir/imageFile.jpg" />
The submitted form will contain a parameter "formAction" (the default) that has the existing value of lessonForm's "formAction" property.
<rs:imageSubmit name="lessonForm" page"/imageDir/imageFile.jpg" value="delete"/>
The submitted form will contain a parameter "formAction" (the default) that has the value "delete".
- Version:
- $Id: ImageSubmitTag.java,v 1.4 2003/09/30 15:13:18 joe Exp $
| Field Summary | |
protected java.lang.String |
alt
The alternate text for this image. |
protected java.lang.String |
altKey
The message resources key for the alternate text for this image. |
protected java.lang.String |
border
The border size around the image. |
protected java.lang.String |
bundle
The servlet context attribute key for our resources. |
protected static java.util.Locale |
defaultLocale
The default Locale for our server. |
protected java.lang.String |
locale
The session attribute key for our locale. |
protected java.lang.String |
page
page |
protected java.lang.String |
pageKey
The message resources key of the context-relative URI of the image. |
protected java.lang.String |
src
src |
protected java.lang.String |
srcKey
The message resources key for the URL of this image. |
| Fields inherited from class com.RuntimeCollective.webapps.tag.SubmitTag |
confirm, defaultValue, htmlJSInput, label, name, paramName, paramProperty, property, value |
| Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag |
accesskey, doDisabled, doReadonly, indexed, messages, 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 | |
ImageSubmitTag()
|
|
| Method Summary | |
protected java.lang.String |
alt()
Return the alternate text to be included on this generated element, or null if there is no such text. |
int |
doStartTag()
Default processing of the start tag returning EVAL_BODY_BUFFERED. |
java.lang.String |
getAlt()
Returns the alternate text attribute. |
java.lang.String |
getAltKey()
Returns the message resources key of the alternate text. |
java.lang.String |
getBorder()
|
java.lang.String |
getBundle()
Returns the name of the message resources bundle to use. |
protected java.lang.String |
getImageUrl()
|
java.lang.String |
getLocale()
Returns the name of the session attribute for our locale. |
java.lang.String |
getPage()
|
java.lang.String |
getPageKey()
|
java.lang.String |
getSrc()
|
java.lang.String |
getSrcKey()
|
protected java.lang.String |
page()
Return the src for the image using either page or pageKey, returns null if neither are specified. |
protected java.lang.String |
prepareAlt()
|
protected java.lang.String |
prepareBorder()
|
void |
release()
Release any acquired resources. |
void |
setAlt(java.lang.String alt)
Sets the alternate text attribute. |
void |
setAltKey(java.lang.String altKey)
Sets the message resources key of the alternate text. |
void |
setBorder(java.lang.String border)
|
void |
setBundle(java.lang.String bundle)
Sets the name of the message resources bundle to use. |
void |
setLocale(java.lang.String locale)
Sets the name of the session attribute for our locale. |
void |
setPage(java.lang.String s)
|
void |
setPageKey(java.lang.String pageKey)
|
void |
setSrc(java.lang.String s)
|
void |
setSrcKey(java.lang.String srcKey)
|
protected java.lang.String |
src()
Return the src for the image using either src or srcKey, returns null if neither are specified. |
| Methods inherited from class com.RuntimeCollective.webapps.tag.SubmitTag |
getConfirm, getDefaultValue, getHtmlJSInput, getLabel, getName, getParamName, getParamProperty, getProperty, getValue, setConfirm, setDefaultValue, setHtmlJSInput, setLabel, setName, setParamName, setParamProperty, setProperty, setValue |
| 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 |
defaultLocale
protected static final java.util.Locale defaultLocale
- The default Locale for our server.
alt
protected java.lang.String alt
- The alternate text for this image.
altKey
protected java.lang.String altKey
- The message resources key for the alternate text for this image.
border
protected java.lang.String border
- The border size around the image.
bundle
protected java.lang.String bundle
- The servlet context attribute key for our resources.
locale
protected java.lang.String locale
- The session attribute key for our locale.
page
protected java.lang.String page
- page
pageKey
protected java.lang.String pageKey
- The message resources key of the context-relative URI of the image.
src
protected java.lang.String src
- src
srcKey
protected java.lang.String srcKey
- The message resources key for the URL of this image.
| Constructor Detail |
ImageSubmitTag
public ImageSubmitTag()
| Method Detail |
getAlt
public java.lang.String getAlt()
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Returns the alternate text attribute.
setAlt
public void setAlt(java.lang.String alt)
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Sets the alternate text attribute.
getAltKey
public java.lang.String getAltKey()
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Returns the message resources key of the alternate text.
setAltKey
public void setAltKey(java.lang.String altKey)
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Sets the message resources key of the alternate text.
getBorder
public java.lang.String getBorder()
setBorder
public void setBorder(java.lang.String border)
getBundle
public java.lang.String getBundle()
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Returns the name of the message resources bundle to use.
setBundle
public void setBundle(java.lang.String bundle)
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Sets the name of the message resources bundle to use.
getLocale
public java.lang.String getLocale()
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Returns the name of the session attribute for our locale.
setLocale
public void setLocale(java.lang.String locale)
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Sets the name of the session attribute for our locale.
getPage
public java.lang.String getPage()
setPage
public void setPage(java.lang.String s)
getPageKey
public java.lang.String getPageKey()
setPageKey
public void setPageKey(java.lang.String pageKey)
getSrc
public java.lang.String getSrc()
setSrc
public void setSrc(java.lang.String s)
getSrcKey
public java.lang.String getSrcKey()
setSrcKey
public void setSrcKey(java.lang.String srcKey)
src
protected java.lang.String src() throws javax.servlet.jsp.JspException
- Return the src for the image using either src or srcKey, returns null if neither are specified.
page
protected java.lang.String page() throws javax.servlet.jsp.JspException
- Return the src for the image using either page or pageKey, returns null if neither are specified.
getImageUrl
protected java.lang.String getImageUrl()
alt
protected java.lang.String alt()
- Return the alternate text to be included on this generated element,
or
nullif there is no such text.
prepareAlt
protected java.lang.String prepareAlt()
prepareBorder
protected java.lang.String prepareBorder()
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Description copied from class:
javax.servlet.jsp.tagext.BodyTagSupport - Default processing of the start tag returning EVAL_BODY_BUFFERED.
- Specified by:
doStartTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classSubmitTag
release
public void release()
- Description copied from class:
org.apache.struts.taglib.html.BaseHandlerTag - Release any acquired resources.
- Specified by:
releasein interfacejavax.servlet.jsp.tagext.Tag- Overrides:
releasein classSubmitTag
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> webapps >> [ tag overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC