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