Chapter 10: Building Dynamic Forms
135
Code Review
Specifying which tree items to send to the action page
When a user selects a tree item and submits the form, the CFTREEITEMKEY variable is
appended to the URL passed to the application page specified in the CFFORM
ACTION attribute, in the form:
http://myserver.com?CFTREEITEMKEY=selected_value
You can disable this key by setting the APPENDKEY attribute in the CFTREE tag to No.
Creating Data Grids with CFGRID
The CFGRID tag allows you to build CFFORM grid controls. A grid control resembles a
spreadsheet table and can contain data populated from a CFQUERY or from other
sources of data. As with other CFFORM tags, CFGRID offers a wide range of data
formatting options as well as the option of validating user selections with a JavaScript
validation script.
You can also do the following with CFGRID:
•
Sort data in the grid alphanumerically
•
Update , insert and delete data
•
Embed images in the grid
When users select grid data and submit the form, ColdFusion passes the selection
information as form variables to the application page specified in the CFFORM
ACTION attribute.
Just as the CFTREE tag uses CFTREEITEM, CFGRID uses the CFGRIDCOLUMN tag.
You define a wide range of row and column formatting options, as well as a query
name, selection options, and so on. You use the CFGRIDCOLUMN tag to define
individual columns in the grid.
Code
Description
HREF="http://www.allaire.com">
Make the node of the tree a link.
HREF="http://forums.allaire.com"
Make the node of the tree a link.
Note HREF can refer to the name of
a column in a query if the tree item
is populated from that query.
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...