![]() ![]() ![]() |
Use the ColdFusion Administrator Extensions pages to register Java applets and CFX tags, custom tags built with C++.
The CFX Tags page in the ColdFusion Administrator is used to Register and manage ColdFusion custom tags built with C++.
ColdFusion allows you to build extensions or custom tags in two ways:
To use a CFX tag you must first register it with ColdFusion. This process simply tells ColdFusion where to find the required DLL when it attempts to process the CFX tag in an application page.
A wide variety of custom tags of both types is available from the ColdFusion Tag Gallery.
Source code and compiled versions of two sample CFX tags are installed with ColdFusion (you can register and use them in your application pages). You must first compile this code before registering the DLLs or shared objects in the ColdFusion Administrator. These examples can be found in opt/coldfusion/cfx/examples
(Solaris) and cfusion\cfx\examples
(Windows).
The two CFX tag examples installed with ColdFusion are as follows:
directorylist
-- Returns a directory listing.
ntuser_db
-- (Windows NT only) Allows you to modify Windows NT user permissions.
CFX_
.
The Applets page in ColdFusion allows you to register Java applets for use in ColdFusion forms with the CFAPPLET tag. Registering the applet before using it in ColdFusion applications allows you to encapsulate the applet in a simple, easy-to-use interface. The CFAPPLET tag you use to place the applet can be used to override any parameters you define in the Administrator Registered Applets page.
Before you can use CFAPPLET to place a Java applet in your CFFORM, you must register the applet in the ColdFusion Administrator.
You can use the CFAPPLET tag to place Java applets in a CFFORM. However, before you can use the tag you need to register your applet using the ColdFusion Administrator. Once your applet is registered with ColdFusion, using the CFAPPLET tag in your code is very simple since all parameters are predefined in the Administrator. Since parameters are predefined in the Administrator, you only need to specify parameter values you want to override for a particular instance. With CFAPPLET, you could enter just the applet source and the form variable name you want to use:
<CFAPPLET APPLETSOURCE="Calculator" NAME="calc_value">
You can define all other parameters when you register the applet in the Administrator. Using the HTML APPLET tag, you'd have to invoke all the applet's parameters every time you wanted to use it in an page.
The new Registered Applets page in the ColdFusion Administrator allows you to register Java applets you want to place in your ColdFusion pages with the CFAPPLET tag.
Applet registration fields are explained in the following table.
Java Applet Registration Fields | |
---|---|
Field | Description |
Codebase |
Enter the base URL of the applet: the directory that contains the applet components. The applet class files must be located within the Web browser root directory. Example:
http://servername/classes |
Code | This is the name of the file that contains the applet subclass. The filename is relative to the codebase URL. The *.class file extension is not required. |
Method | Enter the method name in the applet that returns a string value. You use this method name in the NAME attribute of the CFAPPLET tag to populate a form variable with the method's value. If the applet has no method, leave this field blank. |
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 | Choose the alignment you want. |
Java Not Supported Message | This message is displayed by browsers that do not support Java applets. If you want to override this message, you specify a different message in the CFAPPLET tag NOTSUPPORTED attribute. |
Parameter Name | Enter a name for a required applet parameter. Your Java applet will typically provide the parameter name needed to use the applet. Enter each parameter in a separate parameter field. |
Value | For every parameter you enter, define a default value. Your applet documentation will provide guidelines on valid entries. |
![]() ![]() ![]() |
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.