Handling Form Variables From An Applet; Input Validation With Cfform Controls - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Handling form variables from an applet

The
tag requires you to specify a form variable name for the applet. This variable,
cfapplet
referenced like other ColdFusion form variables,
method returns when it is executed in the
Not all Java applets return values. For instance, many graphical widgets do not return a specific
value; they do their flipping, spinning, fading, exploding, and that is all. For this kind of applet,
the method field in the Administrator remains empty. Other applets, however, do have a method
that returns a value. You can only use one method for each applet that you register. If an applet
includes more than one method that you want to access, you can register the applet with a unique
name for each additional method you want to use.
To reference a Java applet return value in your application page:
Specify the name of the method in the Add/Registered Java Applet page of the ColdFusion MX
1
Administrator.
Specify the method name in the
2
.
cfform
When your page executes the applet, ColdFusion creates a form variable with the name that you
specified. If you do not specify a method, ColdFusion does not create a form variable.

Input validation with cfform controls

The
and
cfinput
valid data entry type for the control. You can validate user entries on the following data types:
Data type
Date
Eurodate
Time
Float
Integer
Telephone
Zipcode
Creditcard
Social_security_number
Regular_expression
name
tags include the
cftextinput
Description
Verifies US date entry in the form mm/dd/yyyy (where the year can have
one through four digits).
Verifies valid European date entry in the form dd/mm/yyyy (where the
year can have one through four digits).
Verifies a time entry in the form hh:mm:ss.
Verifies a floating point entry.
Verifies an integer entry.
Verifies a telephone entry. You must enter telephone data as ###-###-
####. You can replace the hyphen separator (-) with a blank. The area
code and exchange must begin with a digit between 1 and 9.
(U.S. formats only) Number can be a five-digit or nine-digit zip in the
form #####-####. You can replace the hyphen separator (-) with a
blank.
Blanks and dashes are stripped and the number is verified using the
mod10 algorithm.
You must enter the number as ###-##-####. You can replace the
hyphen separator (-) with a blank.
Matches the input against a JavaScript regular expression pattern. You
must use the pattern attribute to specify the regular expression. Any
entry containing characters that matches the pattern is valid.
Form.variable_name
.
cfform
attribute of the
cfapplet
attributes, which lets you specify a
validate

Input validation with cfform controls

holds the value the applet
tag when you code your
609

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents