Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 881

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
For this example to display images, create an images subdirectory of your application directory that contains images
with the names specified by the BOOKIMAGE column of the cfbookclub database BOOKS table.
The roundtrip.cfm page
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<!--- The screen.css style sheet is provided in the Spry distribution. --->
<link href="screen.css" rel="stylesheet" type="text/css" media="all"/>
<!--- Include the XPath and Spry JavaScript files. --->
<script type="text/javascript"
src="/CFIDE/scripts/ajax/spry/includes/xpath.js"></script>
<script type="text/javascript"
src="/CFIDE/scripts/ajax/spry/includes/SpryData.js"></script>
<!--- Create the dsFilters Spry XML data set used to populate the FiltersList dynamic region
that lists the filters. Call the GridDataManager CFC getFilter method directly from a
Spry XMLDataSet function because no binding is needed. --->
<script>
var dsFilters = new
Spry.Data.XMLDataSet("GridDataManager.cfc?method=getFilter", "filters/filter");
</script>
<!--- Use a cfsprydataset tag with binding to generate a dsProduct Spry data set with details
about the book grid selection. --->
<cfsprydataset
name="dsProduct"
type="xml"
bind="CFC:GridDataManager.getProductDetails(prodname={bookform:bookgrid.TITLE})"
xpath="products/product"
options="{method: 'POST'}"
onBindError="errorHandler">
<!--- Function to handle bind errors. --->
<script language="javascript">
errorHandler = function(code,msg){
alert("Error w/bind occurred. See details below:\n\n" + "Error Code: "
+ code + "\n" + "Error Message: " + msg);
}
</script>
<!--- Specify the size of the FiltersList Spry dynamic region.
By default it would be unnecessarily large. --->
<style type="text/css">
<!--
#FiltersList {
height:100px;
width: 150px;
}
-->
</style>
</head>
<body>
<!--- A Spry dynamic region containing repeated ListBoxItem controls.
Each item specifies a filter to use in filling the book list grid.
Last updated 1/20/2012
876

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents