After you register an applet, you can use the cfapplet
tag to place the applet in a ColdFusion page. The cfapplet
tag has two required attributes: appletsource
and name
. Because you registered the applet and you defined each applet parameter with a default value, you can invoke the applet with a very simple form of the cfapplet
tag:
<cfapplet appletSource="appletname" name="form_variable">
To override any of the values defined in the ColdFusion MX Administrator for the applet, you can use the optional cfapplet
parameters to specify custom values. For example, the following cfapplet
tag specifies custom spacing and alignment values:
<cfapplet appletSource="myapplet"
name="applet1_var"
height=400
width=200
vspace=125
hspace=125
align="left">
You can override the values that you assigned to applet parameters in the ColdFusion MX Administrator by providing new values for any parameter. To override a parameter, you must have already defined the parameter and its default value in the ColdFusion MX Administrator Applets page. The following example overrides the default values of two parameters, Param1 and Param2:
<cfapplet appletSource="myapplet"
name="applet1_var"
Param1="registered parameter1"
Param2="registered parameter2">