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

Quick Search    Search Deep

com.RuntimeCollective.webapps.tag
Class SubmitTag  view SubmitTag download SubmitTag.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
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:
ImageSubmitTag

public class SubmitTag
extends org.apache.struts.taglib.html.BaseHandlerTag

A custom JSP tag that produces a submit button whose label is different from the submitted value. 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:submit name="lessonForm" label="Save changes to this lesson"/>
The submitted form will contain a parameter "formAction" (the default) that has the existing value of lessonForm's "formAction" property.

<rs:submit name="lessonForm" label="Delete this lesson" value="delete"/>
The submitted form will contain a parameter "formAction" (the default) that has the value "delete".

Version:
$Id: SubmitTag.java,v 1.11 2003/09/30 15:13:18 joe Exp $

Field Summary
protected  java.lang.String confirm
          The confirmation message.
protected  java.lang.String defaultValue
          The defaultValue of the form.
protected  java.lang.String htmlJSInput
          Whether this form contains an htmlJSInput tag.
protected  java.lang.String label
          The label of the submit button.
protected  java.lang.String name
          The name of the form.
protected  java.lang.String paramName
          The paramName of the form.
protected  java.lang.String paramProperty
          The paramProperty to be set to value.
protected  java.lang.String property
          The property to be set to value.
protected  java.lang.String value
          The value of property to submit.
 
Fields inherited from class org.apache.struts.taglib.html.BaseHandlerTag
accesskey, defaultLocale, 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
SubmitTag()
           
 
Method Summary
 int doStartTag()
          Default processing of the start tag returning EVAL_BODY_BUFFERED.
 java.lang.String getConfirm()
          Get the confirmation message.
 java.lang.String getDefaultValue()
          Get the defaultValue of the form.
 java.lang.String getHtmlJSInput()
          Get whether this form contains an htmlJSInput tag.
 java.lang.String getLabel()
          Get the label of the submit button.
 java.lang.String getName()
          Get the name of the form.
 java.lang.String getParamName()
          Get the paramName of the form.
 java.lang.String getParamProperty()
          Get the paramProperty to be set to value.
 java.lang.String getProperty()
          Get the property to be set to value.
 java.lang.String getValue()
          Get the value of property to submit.
 void release()
          Release any acquired resources.
 void setConfirm(java.lang.String confirm)
          Set the confirmation message.
 void setDefaultValue(java.lang.String defaultValue)
          Set the defaultValue of the form.
 void setHtmlJSInput(java.lang.String htmlJSInput)
          Set whether this form contains an htmlJSInput tag.
 void setLabel(java.lang.String label)
          Set the label of the submit button.
 void setName(java.lang.String name)
          Set the name of the form.
 void setParamName(java.lang.String paramName)
          Set the paramName of the form.
 void setParamProperty(java.lang.String paramProperty)
          Set the paramProperty to be set to value.
 void setProperty(java.lang.String property)
          Set the property to be set to value.
 void setValue(java.lang.String value)
          Set the value of property to submit.
 
Methods inherited from class org.apache.struts.taglib.html.BaseHandlerTag
doErrorsExist, getAccesskey, getAlt, getAltKey, getBundle, getDisabled, getElementClose, getErrorKey, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexed, getIndexValue, 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, prepareKeyEvents, prepareMouseEvents, prepareName, prepareOtherAttributes, prepareStyles, prepareTextEvents, setAccesskey, setAlt, setAltKey, setBundle, setDisabled, setErrorKey, setErrorStyle, setErrorStyleClass, setErrorStyleId, setIndexed, 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, 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

label

protected java.lang.String label
The label of the submit button.


value

protected java.lang.String value
The value of property to submit.


property

protected java.lang.String property
The property to be set to value.


name

protected java.lang.String name
The name of the form.


defaultValue

protected java.lang.String defaultValue
The defaultValue of the form.


confirm

protected java.lang.String confirm
The confirmation message.


htmlJSInput

protected java.lang.String htmlJSInput
Whether this form contains an htmlJSInput tag.


paramName

protected java.lang.String paramName
The paramName of the form.


paramProperty

protected java.lang.String paramProperty
The paramProperty to be set to value.

Constructor Detail

SubmitTag

public SubmitTag()
Method Detail

getLabel

public java.lang.String getLabel()
Get the label of the submit button.


setLabel

public void setLabel(java.lang.String label)
Set the label of the submit button.


getValue

public java.lang.String getValue()
Get the value of property to submit.


setValue

public void setValue(java.lang.String value)
Set the value of property to submit.


getProperty

public java.lang.String getProperty()
Get the property to be set to value.


setProperty

public void setProperty(java.lang.String property)
Set the property to be set to value.


getName

public java.lang.String getName()
Get the name of the form.


setName

public void setName(java.lang.String name)
Set the name of the form.


getDefaultValue

public java.lang.String getDefaultValue()
Get the defaultValue of the form.


setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Set the defaultValue of the form.


getConfirm

public java.lang.String getConfirm()
Get the confirmation message.


setConfirm

public void setConfirm(java.lang.String confirm)
Set the confirmation message.


getHtmlJSInput

public java.lang.String getHtmlJSInput()
Get whether this form contains an htmlJSInput tag.


setHtmlJSInput

public void setHtmlJSInput(java.lang.String htmlJSInput)
Set whether this form contains an htmlJSInput tag.


getParamName

public java.lang.String getParamName()
Get the paramName of the form.


setParamName

public void setParamName(java.lang.String paramName)
Set the paramName of the form.


getParamProperty

public java.lang.String getParamProperty()
Get the paramProperty to be set to value.


setParamProperty

public void setParamProperty(java.lang.String paramProperty)
Set the paramProperty to be set to value.


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.


release

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