Using Cfapplet To Embed An Applet; Handling Form Variables From An Applet - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Embedding Java Applets

Using cfapplet to embed an applet

After you register an applet, you can use the
ColdFusion page. The
name
default value, you can invoke the applet with a very simple form of the
<cfapplet appletSource="appletname" name="form_variable">
Overriding alignment and positioning values
To override any of the values defined in the Administrator for the applet, you can use
the optional
following
<cfapplet appletSource="myapplet"
Overriding parameter values
You can also override the values that you assigned to applet parameters in the
Administrator by providing new values for any parameter. In order to override a
parameter, you must have already defined the parameter and a default value for it in
the ColdFusion Administrator Applets page.
<cfapplet appletSource="myapplet"

Handling form variables from an applet

The
variable, referenced like other ColdFusion form variables,
holds the value the applet 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.
cfapplet
. Since you registered the applet, and you defined each applet parameter with a
parameters to specify custom values. For example, the
cfapplet
tag specifies custom spacing and alignment values:
cfapplet
name="applet1_var"
height=400
width=200
vspace=125
hspace=125
align="left">
name="applet1_var"
Param1="registered parameter1"
Param2="registered parameter2">
tag requires you to specify a form variable name for the applet. This
cfapplet
cfapplet
tag has two required attributes:
tag to place the applet in a
appletsource
cfapplet
Form.
variable_name
cfform
169
and
tag:
.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents