22.08.2013 Views

ColdFusion Developer's Guide

ColdFusion Developer's Guide

ColdFusion Developer's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta<br />

<br />

<br />

Binding controls to grid contents<br />

You can bind the contents of a form control to the data in a grid field by specifying a bind<br />

parameter as the form control attribute value. To do so, use the syntax such as the following:<br />

<br />

By default, each time the selected row in the grid changes, the bind parameter is reevaluated<br />

and the control value changes to the value of the specified column of selected grid cell.<br />

Grid JavaScript functions<br />

You can use the following JavaScript functions to manage an HTML format grid:<br />

Function Description<br />

<strong>ColdFusion</strong>.Grid.getGridObject Gets the underlying Ext JS JavaScript library object.<br />

<strong>ColdFusion</strong>.Grid.refresh Manually refreshes a displayed grid.<br />

<strong>ColdFusion</strong>.Grid.sort Sorts the grid.<br />

For more information on these functions, see CFML Reference.<br />

Using HTML format trees<br />

An HTML format cftree tag creates an AJAX-based tree data representation that you can<br />

populate from a query or a bind expression. The behavior with a query is equivalent to that of<br />

applet or Flash format trees. Bind expressions let you populate the tree based on the values of<br />

other controls or Spry data sets. Additionally, when you use a bind expression, the tree loads<br />

dynamically, getting only the data required for the current display.<br />

Populating the tree using a bind expression<br />

You can use the bind attribute and bind expressions to dynamically and incrementally load<br />

and display tree data as the user navigates the tree. The child tree items do not exist until the<br />

parent node expands. This behavior prevents the need to prefill a tree with large amounts of<br />

data, lets the tree children change dynamically (you can optionally get the children each time<br />

the item expands), and can enhance application responsiveness.<br />

This section provides tree-specific binding information only. For detailed information on<br />

binding in general and bind parameter formats and their use, see Chapter 34, “Using AJAX<br />

Data and Development Features” in CFML Reference.<br />

912 Using AJAX UI Components and Features

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!