CFAPPLET  
Description

This tag references a registered custom Java applet. To register a Java applet, in the ColdFusion Administrator, click Extensions > Java Applets.

Using this tag within a cfform tag is optional. If you use it within cfform, and the method attribute is defined in the Administrator, the return value is incorporated into the form.

 
Category

Forms tags

 
Syntax
<cfapplet 
   appletSource = "applet_name"
   name = "form_variable_name"
   height = "height_in_pixels"
   width = "width_in_pixels"
   vSpace = "space_above_and_below_in_pixels"
   hSpace = "space_on_each_side_in_pixels"
   align = "alignment_option"
   notSupported = "message_to_display_for_nonJava_browser"
   param_1 = "applet_parameter_name"
   param_2 = "applet_parameter_name"
   param_n = "applet_parameter_name">
 
See also

cfform, cfformgroup, cfformitem, cfgrid, cfinput, cfobject, cfselect, cfservlet, cfslider, cftextarea, cftree

 
History

ColdFusion MX:

  • Removed the requirement that you use this tag within a cfform tag.
  • Changed the behavior when this tag is used within a cfform tag; if the method attribute is defined in the Administrator, the return value of the applet's method is incorporated into the form.

       
     

Name of registered applet

     

Form variable name for applet

     

Height of applet, in pixel

     

Width of applet, in pixels

     

Space above and below applet, in pixels

     

Space on left and right of applet, in pixels

     

Alignment:

  • Left
  • Right
  • Bottom
  • Top
  • TextTop
  • Middle
  • AbsMiddle
  • Baseline
  • AbsBottom
     

Text to display if a page that contains a Java applet-based cfform control is opened by a browser that does not support Java or has Java support disabled. For example:

notSupported = "<b>Browser must support Java to view

ColdFusion Java Applets</b>"

Default:

<b>Browser must support Java to<br> view ColdFusion Java Applets!</b>

     

Registered parameter for applet. Specify only to override values for applet in ColdFusion Administrator.

 
Usage

You can specify the applet method attribute only in the Administrator, Java Applets view. For other attributes, you can accept the default values in the Administrator view, or specify values in this tag and override the defaults.

If Java applet components are stored in a JAR file, enter the filename in the ColdFusion Administrator, Java Applets window, Archive text box. For more information, see "Embedding Java applets" in Chapter 27, "Building Dynamic Forms with cfform Tags" in ColdFusion MX Developer's Guide

 
Example
<p>cfapplet lets you reference custom Java applets that have been 
   registered using the ColdFusion Administrator.
<p>To register a Java applet, open the ColdFusion Administrator and 
   click "Applets" link under "extensions" section.
<p>This example applet copies text that you type into a form. Type 
   some text, and then click "copy" to see the copied text.

<cfform action = "index.cfm">
   <cfapplet appletsource = "copytext" name = "copytext">
</cfform>
APPLETSOURCE  
  Required
 
NAME  
  Required
 
HEIGHT  
  Optional
 
WIDTH  
  Optional
 
VSPACE  
  Optional
 
HSPACE  
  Optional
 
ALIGN  
  Optional
 
NOTSUPPORTED  
  Optional
 
Default value: "See Description"
PARAM_N  
  Optional