Using Event Gateways - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
<!--- Use cfsetting to block output of HTML
outside cfoutput tags. --->
<cfsetting enablecfoutputonly="Yes">
<!--- Get employee info. --->
<cfquery name="GetEmps" datasource="cfdocexamples">
SELECT * FROM Employee
</cfquery>
<!--- Set content type. --->
<cfcontent type="application/msexcel">
<!--- Suggest default name for XLS file. --->
<!--- "Content-Disposition" in cfheader also ensures
relatively correct Internet Explorer behavior. --->
<cfheader name="Content-Disposition" value="filename=Employees.xls">
<!--- Format data using cfoutput and a table.
Excel converts the table to a spreadsheet.
The cfoutput tags around the table tags force output of the HTML when
using cfsetting enablecfoutputonly="Yes" --->
<cfoutput>
<table cols="4">
<cfloop query="GetEmps">
<tr>
<td>#Emp_ID#</td>
<td>#FirstName#</td>
<td>#LastName#</td>
</tr>
</cfloop>
</table>
</cfoutput>
2
Save the file as employees_to_excel.cfm in the myapps directory under your web_root and view it in the browser.
The data appears in an Excel spreadsheet.

Using Event Gateways

Adobe ColdFusion provides event gateways, which you can use when writing applications. You configure an event
gateway for an application and deploy the application.
To use event gateways, you should have a thorough knowledge of ColdFusion development concepts and practices,
including ColdFusion components (CFCs). To write applications for custom gateways that are not provided in
ColdFusion, you must also know the details of the event gateway you are using, including its requirements.
About event gateways
ColdFusion event gateways are ColdFusion elements that let ColdFusion react to or generate external events or
messages in an asynchronous manner. Event gateways let a ColdFusion application handle information that does not
come through an HTTP request. For example, you can use event gateways to handle instant messages, short messages
from mobile devices, or messages sent to a TCP/IP port.
Last updated 1/20/2012
1254

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents