Adobe COLDFUSION 9 Manual page 232

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Building Blocks of ColdFusion Applications
You can now call the tag from a ColdFusion page.
Call a CFX tag from a ColdFusion page
Create a ColdFusion page (.cfm) in your editor with the following content to call the HelloColdFusion custom tag:
1
<html>
<body>
<cfx_MyHelloColdFusion NAME="Les">
</body>
</html>
2
Save the file in a directory configured to serve ColdFusion pages. For example, you can save the file as
C:\inetpub\wwwroot\cfdocs\testjavacfx.cfm in Windows or /home/docroot/cfdocs/testjavacfx.cfm in UNIX.
3
If you have not already done so, register the CFX tag in the ColdFusion Administrator (see
on page 234).
Request the page from your browser using the appropriate URL; for example:
4
http://localhost/cfdocs/testjavacfx.cfm
ColdFusion processes the page and returns a page that displays the text "Hello, Les." If an error is returned instead,
check the source code to make sure that you entered it correctly.
Delete a CFX tag in the ColdFusion Administrator
1
In the ColdFusion Administrator, select Extensions > CFX Tags.
For the tag to delete, click the Delete icon in the Controls column of the Registered CFX Tags list.
2
Processing requests
Implementing a Java CFX tag requires interaction with the
method. In addition, CFX tags that must work with ColdFusion queries also interface with the
processRequest
object. The
Query
com.allaire.cfx
, and
objects.
Response
Query
For a complete description of these object types, see ColdFusion Java CFX Reference in the CFML Reference. For a
complete example Java CFX tag that uses
page 228.
Request object
The
object is passed to the
Request
methods of the
object for retrieving attributes, including queries, passed to the tag and for reading global tag
Request
settings:
Method
attributeExists
debug
getAttribute
getAttributeList
Request
package, located in the WEB-INF/lib/cfx.jar archive, contains the
,
, and
Request
Response
method of the
processRequest
Description
Checks whether the attribute was passed to this tag.
Checks whether the tag contains the
Retrieves the value of the passed attribute.
Retrieves a list of all attributes passed to the tag.
Last updated 8/5/2010
"Registering CFX
and
objects passed to the
Response
objects, see
"ZipBrowser
Query
interface. The following table lists the
CustomTag
debug
attribute.
227
tags"
,
Request
example" on

Advertisement

Table of Contents
loading

Table of Contents