Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.webapps.tag
Class ImageSubmitTag  view ImageSubmitTag download ImageSubmitTag.java

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byjavax.servlet.jsp.tagext.BodyTagSupport
          extended byorg.apache.struts.taglib.html.BaseHandlerTag
              extended bycom.RuntimeCollective.webapps.tag.SubmitTag
                  extended bycom.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:

This allows you to either specify the value explicitly, or take it from a bean's property.

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 org.apache.struts.taglib.html.BaseHandlerTag
doErrorsExist, getAccesskey, getDisabled, getElementClose, getErrorKey, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexed, getIndexValue, 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, prepareKeyEvents, prepareMouseEvents, prepareName, prepareOtherAttributes, prepareStyles, prepareTextEvents, setAccesskey, setDisabled, setErrorKey, setErrorStyle, setErrorStyleClass, setErrorStyleId, setIndexed, 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, 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 null if 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:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class SubmitTag

release

public void release()
Description copied from class: org.apache.struts.taglib.html.BaseHandlerTag
Release any acquired resources.

Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class SubmitTag