|
|||||||||
| 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 SubmitTag

java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.apache.struts.taglib.html.BaseHandlerTag
com.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:
-
name- The name of the current form. [Mandatory]. -
label- The label of the submit button. [Mandatory]. -
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]. -
defaultValue- The default value to submit, used if the user presses Enter. Defaults to "dummy". [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].
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 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.
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> webapps >> [ tag overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC