608
Chapter 27: Building Dynamic Forms
Using cfapplet to embed an applet
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
">
Overriding alignment and positioning values
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">
Overriding parameter values
You can also override the values that you assigned to applet parameters in the ColdFusion MX
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 MX
Administrator Applets page, as follows:
<cfapplet appletSource="myapplet"
name="applet1_var"
Param1="registered parameter1"
Param2="registered parameter2">
Height
Enter a measurement in pixels for the vertical space for the applet.
Width
Enter a measurement in pixels for the horizontal space for the applet.
Vspace
Enter a measurement in pixels for the space above and below the applet.
Hspace
Enter a measurement in pixels for the space on each side of the applet.
Align
Select the alignment.
Not Supported Message This message is displayed by browsers that do not support Java applets.
To override this message, you specify a different message in the
cfapplet
notsupported
attribute.
Parameter Name
Enter a name for a required applet parameter. Your Java applet typically
provides the parameter name needed to use the applet. Enter each
parameter in a separate parameter field.
Value
For every parameter that you enter, define a default value. Your applet
documentation provides guidelines on valid entries.
Field
Description
Summary of Contents for ColdFusion MX
Page 1: ...Developing ColdFusion MX Applications...
Page 22: ...22 Contents...
Page 38: ......
Page 52: ...52 Chapter 2 Elements of CFML...
Page 162: ......
Page 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Page 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Page 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Page 266: ......
Page 314: ...314 Chapter 14 Handling Errors...
Page 344: ...344 Chapter 15 Using Persistent Data and Locking...
Page 349: ...About user security 349...
Page 357: ...Security scenarios 357...
Page 370: ...370 Chapter 16 Securing Applications...
Page 388: ...388 Chapter 17 Developing Globalized Applications...
Page 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Page 410: ......
Page 426: ...426 Chapter 19 Introduction to Databases and SQL...
Page 476: ...476 Chapter 22 Using Query of Queries...
Page 534: ...534 Chapter 24 Building a Search Interface...
Page 556: ...556 Chapter 25 Using Verity Search Expressions...
Page 558: ......
Page 582: ...582 Chapter 26 Retrieving and Formatting Data...
Page 668: ......
Page 734: ...734 Chapter 32 Using Web Services...
Page 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Page 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Page 788: ......