|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
org.apache.struts.taglib.html.FormTag
public class FormTag
Custom tag that represents an input form, associated with a bean whose properties correspond to the various fields of the form.
Field Summary | |
---|---|
protected java.lang.String |
acceptCharset
The list of character encodings for input data that the server should accept. |
protected java.lang.String |
action
The action URL to which this form should be submitted, if any. |
protected java.lang.String |
beanName
The name of the form bean to (create and) use. |
protected java.lang.String |
beanScope
The scope of the form bean to (create and) use. |
protected java.lang.String |
beanType
The type of the form bean to (create and) use. |
protected java.lang.String |
enctype
The content encoding to be used on a POST submit. |
protected java.lang.String |
focus
The name of the field to receive focus, if any. |
protected java.lang.String |
focusIndex
The index in the focus field array to receive focus. |
protected static java.lang.String |
lineEnd
The line ending string. |
protected ActionMapping |
mapping
The ActionMapping defining where we will be submitting this form |
protected static MessageResources |
messages
The message resources for this package. |
protected java.lang.String |
method
The request method used when submitting this form. |
protected ModuleConfig |
moduleConfig
The module configuration for our module. |
protected java.lang.String |
onreset
The onReset event script. |
protected java.lang.String |
onsubmit
The onSubmit event script. |
protected boolean |
readonly
Controls whether child controls should be 'readonly'. |
protected boolean |
scriptLanguage
Include language attribute in the focus script's <script> element. |
protected ActionServlet |
servlet
The ActionServlet instance we are associated with (so that we can initialize the servlet property on any form bean that we
create). |
protected java.lang.String |
style
The style attribute associated with this tag. |
protected java.lang.String |
styleClass
The style class associated with this tag. |
protected java.lang.String |
styleId
The identifier associated with this tag. |
protected java.lang.String |
target
The window target. |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
id, pageContext |
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 | |
---|---|
FormTag()
|
Method Summary | |
---|---|
int |
doEndTag()
Render the end of this form. |
int |
doStartTag()
Render the beginning of this form. |
java.lang.String |
getAcceptCharset()
Return the list of character encodings accepted. |
java.lang.String |
getAction()
Return the action URL to which this form should be submitted. |
java.lang.String |
getBeanName()
Return the name of the form bean corresponding to this tag. |
java.lang.String |
getDir()
Returns the direction for weak/neutral text this element. |
java.lang.String |
getEnctype()
Return the content encoding used when submitting this form. |
java.lang.String |
getFocus()
Return the focus field name for this form. |
java.lang.String |
getFocusIndex()
Returns the focusIndex. |
java.lang.String |
getLang()
Returns the language code of this element. |
java.lang.String |
getMethod()
Return the request method used when submitting this form. |
java.lang.String |
getOnreset()
Return the onReset event script. |
java.lang.String |
getOnsubmit()
Return the onSubmit event script. |
boolean |
getScriptLanguage()
Gets whether or not the focus script's <script> element will include the language attribute. |
java.lang.String |
getStyle()
Return the style attribute for this tag. |
java.lang.String |
getStyleClass()
Return the style class for this tag. |
java.lang.String |
getStyleId()
Return the style identifier for this tag. |
java.lang.String |
getTarget()
Return the window target. |
protected void |
initFormBean()
Locate or create the bean associated with our form. |
boolean |
isDisabled()
Returns the disabled event handler. |
boolean |
isReadonly()
Returns the readonly event handler. |
protected void |
lookup()
Look up values for the name , scope , and
type properties if necessary. |
void |
release()
Release any acquired resources. |
protected void |
renderAction(java.lang.StringBuffer results)
Renders the action attribute |
protected void |
renderAttribute(java.lang.StringBuffer results,
java.lang.String attribute,
java.lang.String value)
Renders attribute="value" if not null |
protected java.lang.String |
renderFocusJavascript()
Generates javascript to set the initial focus to the form element given in the tag's "focus" attribute. |
protected java.lang.String |
renderFormStartElement()
Generates the opening <form> element with
appropriate attributes. |
protected void |
renderName(java.lang.StringBuffer results)
Renders the name of the form. |
protected void |
renderOtherAttributes(java.lang.StringBuffer results)
'Hook' to enable this tag to be extended and additional attributes added. |
protected java.lang.String |
renderToken()
Generates a hidden input field with token information, if any. |
void |
setAcceptCharset(java.lang.String acceptCharset)
Set the list of character encodings accepted. |
void |
setAction(java.lang.String action)
Set the action URL to which this form should be submitted. |
void |
setDir(java.lang.String dir)
Sets the direction for weak/neutral text of this element. |
void |
setDisabled(boolean disabled)
Sets the disabled event handler. |
void |
setEnctype(java.lang.String enctype)
Set the content encoding used when submitting this form. |
void |
setFocus(java.lang.String focus)
Set the focus field name for this form. |
void |
setFocusIndex(java.lang.String focusIndex)
Sets the focusIndex. |
void |
setLang(java.lang.String lang)
Sets the language code of this element. |
void |
setMethod(java.lang.String method)
Set the request method used when submitting this form. |
void |
setOnreset(java.lang.String onReset)
Set the onReset event script. |
void |
setOnsubmit(java.lang.String onSubmit)
Set the onSubmit event script. |
void |
setReadonly(boolean readonly)
Sets the readonly event handler. |
void |
setScriptLanguage(boolean scriptLanguage)
Sets whether or not the focus script's <script> element will include the language attribute. |
void |
setStyle(java.lang.String style)
Set the style attribute for this tag. |
void |
setStyleClass(java.lang.String styleClass)
Set the style class for this tag. |
void |
setStyleId(java.lang.String styleId)
Set the style identifier for this tag. |
void |
setTarget(java.lang.String target)
Set the window target. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, 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 |
Field Detail |
---|
protected static java.lang.String lineEnd
protected static MessageResources messages
protected java.lang.String action
protected ModuleConfig moduleConfig
protected java.lang.String enctype
protected java.lang.String focus
protected java.lang.String focusIndex
protected ActionMapping mapping
protected java.lang.String method
protected java.lang.String onreset
protected java.lang.String onsubmit
protected boolean scriptLanguage
protected ActionServlet servlet
servlet
property on any form bean that we
create).
protected java.lang.String style
protected java.lang.String styleClass
protected java.lang.String styleId
protected java.lang.String target
protected java.lang.String beanName
ActionMapping
otherwise.
protected java.lang.String beanScope
ActionMapping
otherwise.
protected java.lang.String beanType
ActionMapping
otherwise.
protected java.lang.String acceptCharset
protected boolean readonly
Constructor Detail |
---|
public FormTag()
Method Detail |
---|
public java.lang.String getBeanName()
public java.lang.String getAction()
public void setAction(java.lang.String action)
action
- The new action URLpublic java.lang.String getEnctype()
public void setEnctype(java.lang.String enctype)
enctype
- The new content encodingpublic java.lang.String getFocus()
public void setFocus(java.lang.String focus)
focus
- The new focus field namepublic java.lang.String getMethod()
public void setMethod(java.lang.String method)
method
- The new request methodpublic java.lang.String getOnreset()
public void setOnreset(java.lang.String onReset)
onReset
- The new event scriptpublic java.lang.String getOnsubmit()
public void setOnsubmit(java.lang.String onSubmit)
onSubmit
- The new event scriptpublic java.lang.String getStyle()
public void setStyle(java.lang.String style)
style
- The new style attributepublic java.lang.String getStyleClass()
public void setStyleClass(java.lang.String styleClass)
styleClass
- The new style classpublic java.lang.String getStyleId()
public void setStyleId(java.lang.String styleId)
styleId
- The new style identifierpublic java.lang.String getTarget()
public void setTarget(java.lang.String target)
target
- The new window targetpublic java.lang.String getAcceptCharset()
public void setAcceptCharset(java.lang.String acceptCharset)
acceptCharset
- The list of character encodingspublic void setDisabled(boolean disabled)
public boolean isDisabled()
public void setReadonly(boolean readonly)
public boolean isReadonly()
public java.lang.String getLang()
public void setLang(java.lang.String lang)
public java.lang.String getDir()
public void setDir(java.lang.String dir)
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredprotected void initFormBean() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
protected java.lang.String renderFormStartElement() throws javax.servlet.jsp.JspException
<form>
element with
appropriate attributes.
javax.servlet.jsp.JspException
protected void renderName(java.lang.StringBuffer results) throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
protected void renderAction(java.lang.StringBuffer results)
protected void renderOtherAttributes(java.lang.StringBuffer results)
protected java.lang.String renderToken()
protected void renderAttribute(java.lang.StringBuffer results, java.lang.String attribute, java.lang.String value)
public int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredprotected java.lang.String renderFocusJavascript()
public void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.TagSupport
protected void lookup() throws javax.servlet.jsp.JspException
name
, scope
, and
type
properties if necessary.
javax.servlet.jsp.JspException
- if a required value cannot be looked uppublic java.lang.String getFocusIndex()
public void setFocusIndex(java.lang.String focusIndex)
focusIndex
- The focusIndex to setpublic boolean getScriptLanguage()
public void setScriptLanguage(boolean scriptLanguage)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |