|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.form.html.Form
public class Form
Convenience Object for creating HTML forms.
An HTML form is a section of a document containing normal content, markup, special elements called controls (checkboxes, radio buttons, menus, etc.), and labels on those controls. Users generally "complete" a form by modifying its controls (entering text, selecting menu items, etc.), before submitting the form to an agent for processing (e.g., to a Web server, to a mail server, etc.)
Note that the toString() method on this class calls the write
method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_ENCODE_TYPE
Sets the default mechanism used to encode the form's content. |
static java.lang.String |
DEFAULT_METHOD
Sets the default HTTP method to be used when sending the form contents to the server. |
static java.lang.String |
DEFAULT_VALIDATION_FUNCTION_NAME
Sets the default name of the validation function to create if there are input fields associated with the form (via the validate methods). |
Constructor Summary | |
---|---|
Form()
Construct a new Form object |
|
Form(java.lang.String name)
Construct a new Form object |
Method Summary | |
---|---|
void |
addComponent(TransformationInterface bean)
Registers components to the Form's component list. |
java.lang.String |
getAction()
Gets the URL which is used to post forms |
java.lang.String |
getClearErrorsFunctionName()
Gets the name of the clear errors function. |
java.util.List |
getComponents()
Gets the components registered to the Form. |
java.lang.String |
getEncodeType()
Gets the mechanism used to encode the form's content. |
java.lang.String |
getMethod()
Gets the HTTP method to be used when sending the form contents to the server. |
java.lang.String |
getName()
Gets the name that will be used to identify the content when it is submitted to the server |
java.lang.String |
getOnBlur()
Gets the onBlur value. |
java.lang.String |
getOnClick()
Gets the onClick value. |
java.lang.String |
getOnFocus()
Gets the onFocus value. |
java.lang.String |
getOnKeyDown()
Gets the onKeyDown value. |
java.lang.String |
getOnKeyPress()
Gets the onKeyPress value. |
java.lang.String |
getOnKeyUp()
Gets the onKeyUp value. |
java.lang.String |
getOnLoad()
Gets the onLoad value. |
java.lang.String |
getOnMouseDown()
Gets the onMouseDown value. |
java.lang.String |
getOnMouseOut()
Gets the onMouseOut value. |
java.lang.String |
getOnMouseOver()
Gets the onMouseOver value. |
java.lang.String |
getOnMouseUp()
Gets the onMouseUp value. |
java.lang.String |
getOnReset()
Gets the onReset value. |
java.lang.String |
getOnSubmit()
Returns the name of the function to call when the form is submitted |
java.lang.String |
getOnSubmitFunctionCall()
Gets the onSubmitFunctionCall value. |
java.lang.String |
getOnUnload()
Gets the onUnload value. |
java.lang.String |
getProcessErrorsFunctionName()
Gets the name of the process errors function. |
java.lang.String |
getRenderErrorsFunctionName()
Gets the name of the render errors function. |
java.lang.String |
getTarget()
Returns the window name that displays the data returned by the invoked program. |
java.lang.String |
getValidationFunctionName()
Gets the name of the validation function. |
boolean |
isAutoComplete()
Returns true if auto complete is turned on the form element, false otherwise. |
boolean |
isValidationEnabled()
Returns the validationEnabled attribute of the Form Tag. |
protected boolean |
isValidationNecessary()
Returns true if the validation for the form is enabled |
void |
setAction(java.lang.String action)
Sets the URL which is used to post forms via email (i.e "mailto:some.one@sas.com") or a server-side form handler (such as a servlet or JSP page) via HTTP (i.e. |
void |
setAutoComplete(boolean value)
Sets the state of the autoComplete on this form element. |
void |
setClearErrorsFunctionName(java.lang.String name)
Sets the name of the clear errors function to call when validation fails. |
void |
setEncodeType(java.lang.String enctype)
Sets the mechanism used to encode the form's content. |
void |
setMethod(java.lang.String method)
Sets the HTTP method to be used when sending the form contents to the server. |
void |
setName(java.lang.String value)
Sets the name that will be used to identify the content when it is submitted to the server |
void |
setOnBlur(java.lang.String value)
Sets the onBlur event for the form. |
void |
setOnClick(java.lang.String value)
Sets the onClick event for the form. |
void |
setOnFocus(java.lang.String value)
Sets the onFocus event for the form. |
void |
setOnKeyDown(java.lang.String value)
Sets the onKeyDown event for the form. |
void |
setOnKeyPress(java.lang.String value)
Sets the onKeyPress event for the form. |
void |
setOnKeyUp(java.lang.String value)
Sets the onKeyUp event for the form. |
void |
setOnLoad(java.lang.String value)
Sets the onLoad event value. |
void |
setOnMouseDown(java.lang.String value)
Sets the onMouseDown event for the form. |
void |
setOnMouseOut(java.lang.String value)
Sets the onMouseOut event for the form. |
void |
setOnMouseOver(java.lang.String value)
Sets the onMouseOver event for the form. |
void |
setOnMouseUp(java.lang.String value)
Sets the onMouseUp event for the form. |
void |
setOnReset(java.lang.String value)
Sets the onReset event value. |
void |
setOnSubmit(java.lang.String name)
Sets the name of the function to call when the form is submitted. |
void |
setOnSubmitFunctionCall(java.lang.String name)
Sets the onSubmitFunctionCall value. |
void |
setOnUnload(java.lang.String value)
Sets the onUnload event value. |
void |
setProcessErrorsFunctionName(java.lang.String name)
Sets the name of the process errors function to call if validation fails. |
void |
setRenderErrorsFunctionName(java.lang.String name)
Sets the name of the render errors function to call if validation fails. |
void |
setTarget(java.lang.String target)
Sets the window name that displays the data returned by the invoked program. |
void |
setValidationEnabled(boolean validationEnabled)
Sets the the validationEnabled attribute on the Form The default is false. |
void |
setValidationFunctionName(java.lang.String name)
Sets the name of the validation function to create if there are input fields associated with the form (via the validate methods). |
void |
write(java.io.PrintWriter out)
Writes the transformed representation of the object |
void |
writeFooter(java.io.OutputStream out)
Writes the form footer |
void |
writeFooter(java.io.PrintWriter out)
Writes the form footer |
void |
writeFooter(java.io.Writer out)
Writes the form footer |
void |
writeHeader(java.io.OutputStream out)
Writes the form header |
void |
writeHeader(java.io.PrintWriter out)
Writes the form header |
void |
writeHeader(java.io.Writer out)
Writes the form header |
protected boolean |
writeValidations(java.io.PrintWriter out)
Writes the validation routines |
Field Detail |
---|
public static final java.lang.String DEFAULT_METHOD
public static final java.lang.String DEFAULT_ENCODE_TYPE
public static final java.lang.String DEFAULT_VALIDATION_FUNCTION_NAME
Constructor Detail |
---|
public Form()
public Form(java.lang.String name)
name
- The name of the formMethod Detail |
---|
public void setName(java.lang.String value)
setName
in interface TransformationInterface
setName
in class BaseTransformation
value
- The nameBaseTransformation.setId(java.lang.String)
public java.lang.String getName()
getName
in interface TransformationInterface
getName
in class BaseTransformation
BaseTransformation.getId()
public void setMethod(java.lang.String method)
method
- The HTTP methodpublic java.lang.String getMethod()
public void setAction(java.lang.String action)
action
- The action URLpublic java.lang.String getAction()
public void setEncodeType(java.lang.String enctype)
enctype
- The encode typepublic java.lang.String getEncodeType()
public void setValidationFunctionName(java.lang.String name)
name
- The validation function namepublic java.lang.String getValidationFunctionName()
public void setOnSubmit(java.lang.String name)
name
- The onSubmit function namepublic java.lang.String getOnSubmit()
public void setTarget(java.lang.String target)
target
- The window name that displays the data returned by the invoked program.public java.lang.String getTarget()
public void setValidationEnabled(boolean validationEnabled)
validationEnabled
- The validationEnabled propertypublic boolean isValidationEnabled()
public void setOnBlur(java.lang.String value)
value
- The onBlur valuepublic java.lang.String getOnBlur()
public void setOnClick(java.lang.String value)
value
- The onClick valuepublic java.lang.String getOnClick()
public void setOnFocus(java.lang.String value)
value
- The onFocus valuepublic java.lang.String getOnFocus()
public void setOnLoad(java.lang.String value)
value
- The onLoad valuepublic java.lang.String getOnLoad()
public void setOnKeyDown(java.lang.String value)
value
- The onKeyDown valuepublic java.lang.String getOnKeyDown()
public void setOnKeyPress(java.lang.String value)
value
- The onKeyPress valuepublic java.lang.String getOnKeyPress()
public void setOnKeyUp(java.lang.String value)
value
- The onKeyUp valuepublic java.lang.String getOnKeyUp()
public void setOnMouseDown(java.lang.String value)
value
- The onMouseDown valuepublic java.lang.String getOnMouseDown()
public void setOnMouseUp(java.lang.String value)
value
- The onMouseUp valuepublic java.lang.String getOnMouseUp()
public void setOnMouseOut(java.lang.String value)
value
- The onMouseOut valuepublic java.lang.String getOnMouseOut()
public void setOnMouseOver(java.lang.String value)
value
- The onMouseOver valuepublic java.lang.String getOnMouseOver()
public void setOnReset(java.lang.String value)
value
- The onReset valuepublic java.lang.String getOnReset()
public void setOnUnload(java.lang.String value)
value
- The onUnload valuepublic java.lang.String getOnUnload()
public void addComponent(TransformationInterface bean)
bean
- The Form's registered componentspublic java.util.List getComponents()
public void setOnSubmitFunctionCall(java.lang.String name)
function onSubmitFunctionCall(theForm)
{
......
}
The parameter is the form being submitted.
name
- The onSubmitFunctionCallpublic java.lang.String getOnSubmitFunctionCall()
public void setProcessErrorsFunctionName(java.lang.String name)
function processErrorsFunctionCall(theForm)
{
......
}
The parameter is the form being submitted.
name
- The process errors function namepublic java.lang.String getProcessErrorsFunctionName()
public void setRenderErrorsFunctionName(java.lang.String name)
function renderErrorsFunctionCall(theForm, errMsgArray)
{
......
}
The fist parameter is the form being submitted.
The second parameter is the array containing the error messages.
name
- The render errors function namepublic java.lang.String getRenderErrorsFunctionName()
public void setClearErrorsFunctionName(java.lang.String name)
function clearErrorsFunctionCall(theForm)
{
......
}
The fist parameter is the form being submitted.
name
- The clear errors function namepublic java.lang.String getClearErrorsFunctionName()
public void write(java.io.PrintWriter out) throws java.io.IOException
write
in interface TransformationInterface
write
in interface com.sas.util.WriteToPrintWriterInterface
write
in class BaseTransformation
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeHeader(java.io.PrintWriter out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occursprotected boolean isValidationNecessary()
protected boolean writeValidations(java.io.PrintWriter out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeHeader(java.io.Writer out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeHeader(java.io.OutputStream out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeFooter(java.io.PrintWriter out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeFooter(java.io.Writer out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void writeFooter(java.io.OutputStream out) throws java.io.IOException
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic void setAutoComplete(boolean value)
value
- the state of the form's auto completionpublic boolean isAutoComplete()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |