|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Convenience interface for creating HTML forms. A form can also perform client-side validations (via JavaScript) such as:
Field Summary | |
static int |
VALIDATE_MAXLENGTH
Flag used to ensure that the field does not exceed a maximum length when validating. |
static int |
VALIDATE_MAXVALUE
Flag used to ensure that the field contains only numeric values and is less than, or equal to, a maximum value. |
static int |
VALIDATE_MINVALUE
Flag used to ensure that the field contains only numeric values and is greater than, or equal to, a minimum value. |
static int |
VALIDATE_NONE
Flag used to clear the validation for the field |
static int |
VALIDATE_NUMERIC
Flag used to ensure that the field contains only numeric values when validating. |
static int |
VALIDATE_REQUIRED
Flag used to ensure that the field is non-blank when validating. |
Method Summary | |
String |
getAction()
Gets the URL which is used to post forms |
String |
getEncodeType()
Gets the mechanism used to encode the form's content. |
String |
getMethod()
Gets the HTTP method to be used when sending the form contents to the server. |
String |
getOnSubmitFunctionName()
Returns the name of the function to call when the form is submitted |
String |
getValidationFunctionName()
Gets the name of the validation function. |
void |
setAction(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 |
setEncodeType(String enctype)
Sets the mechanism used to encode the form's content. |
void |
setMethod(String method)
Sets the HTTP method to be used when sending the form contents to the server. |
void |
setOnSubmitFunctionName(String name)
Sets the name of the function to call when the form is submitted. |
void |
setValidationFunctionName(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 |
validate(TransformationInterface bean,
int type)
Register a transformation bean to be validated before the form is submitted. |
void |
validate(TransformationInterface bean,
int type,
Object arg)
Register a transformation bean to be validated before the form is submitted. |
void |
writeFooter(OutputStream out)
Writes the form footer |
void |
writeFooter(PrintWriter out)
Writes the form footer |
void |
writeFooter(Writer out)
Writes the form footer |
void |
writeHeader(OutputStream out)
Writes the form header |
void |
writeHeader(PrintWriter out)
Writes the form header |
void |
writeHeader(Writer out)
Writes the form header |
Methods inherited from interface com.sas.servlet.beans.TransformationInterface |
getCustomAttributes,
getDescription,
getName,
getParent,
getRequest,
getResponse,
setCustomAttributes,
setDescription,
setName,
setParent,
setRequest,
setResponse,
write,
write,
write,
write |
Methods inherited from interface com.sas.ViewInterface |
attachModel,
detachModel,
getModelInterface,
getRequiredInterfaces,
getViewInterfaceSupportInfo,
refresh,
removeInterfaceTraps,
setModelInterface,
setRequiredInterfaces,
setViewInterfaceSupportInfo,
supportsRequiredInterfaces,
trapInterfaceEvents |
Methods inherited from interface com.sas.ModelInterface |
attachView,
detachView |
Methods inherited from interface com.sas.LinkPropertiesInterface |
addLink,
getLinkInfo,
isLinked,
queryLinks,
queryLinks,
removeAllLinks,
removeLink,
setLinkInfo |
Methods inherited from interface java.beans.PropertyChangeListener |
propertyChange |
Methods inherited from interface java.io.ObjectInputValidation |
validateObject |
Field Detail |
public static final int VALIDATE_NONE
public static final int VALIDATE_REQUIRED
public static final int VALIDATE_NUMERIC
public static final int VALIDATE_MAXLENGTH
public static final int VALIDATE_MINVALUE
public static final int VALIDATE_MAXVALUE
Method Detail |
public void setMethod(String method)
method
- The HTTP methodpublic String getMethod()
public void setAction(String action)
action
- The action URLpublic String getAction()
public void setEncodeType(String enctype)
enctype
- The encode typepublic String getEncodeType()
public void setValidationFunctionName(String name)
name
- The validation function namepublic String getValidationFunctionName()
public void setOnSubmitFunctionName(String name)
name
- The onSubmit function namepublic String getOnSubmitFunctionName()
public void validate(TransformationInterface bean, int type)
Register a transformation bean to be validated before the form is submitted. A JavaScript function will be generated to perform the validation.
For example, a Text Transformation Bean can be validated to be non-blank:
or numeric-only:
or both:
transformationBean
- The input field to validatetype
- The type of validationpublic void validate(TransformationInterface bean, int type, Object arg)
Register a transformation bean to be validated before the form is submitted. This method takes an additional validation type specific argument
For example, a Text Transformation Bean can be validated to have a maximum length:
validate the minimum numeric value:
validate the minimum numeric value:
transformationBean
- The input field to validatetype
- The type of validationarg
- The validation type specific argumentpublic void writeHeader(PrintWriter out) throws IOException
out
- The output streampublic void writeHeader(Writer out) throws IOException
out
- The output streampublic void writeHeader(OutputStream out) throws IOException
out
- The output streampublic void writeFooter(PrintWriter out) throws IOException
out
- The output streampublic void writeFooter(Writer out) throws IOException
out
- The output streampublic void writeFooter(OutputStream out) throws IOException
out
- The output stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |