Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 740

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Requesting and Presenting Information
How user edits are returned
When a user inserts or deletes a row in a grid or changes any cells in a row and submits the grid, ColdFusion creates
the following arrays as Form variables:
Array name
gridname.colname
gridname.Original.colname
gridname.RowStatus.Action
Note: The periods in these names are not structure separators; they are part of the text of the array name.
ColdFusion creates a gridname.colname array and a gridname.Original.colname array for each column in the grid. For
each inserted, deleted, or changed row in the grid, ColdFusion creates a row in each of these arrays.
For example, the following arrays are created if you update a
columns (col1, col2) and one hidden column (col3):
Form.mygrid.col1
Form.mygrid.col2
Form.mygrid.col3
Form.mygrid.original.col1
Form.mygrid.original.col2
Form.mygrid.original.col3
Form.mygrid.RowStatus.Action
The value of the array index increments for each row that is added, deleted, or changed, and does not indicate a grid
row number. All rows for a particular change have the same index in all arrays. Unchanged rows do not have entries
in the arrays.
If the user changes a single cell in col2, the following array elements contain the edit operation, the edited cell value,
and the original cell value:
Form.mygrid.RowStatus.Action[1]
Form.mygrid.col2[1]
Form.mygrid.original.col2[1]
If the user changes the values of the cells in col1 and col3 in one row and the cell in col2 in another row, the information
about the original and changed values is in the following array entries:
Form.mygrid.RowStatus.Action[1]
Form.mygrid.col1[1]
Form.mygrid.original.col1[1]
Form.mygrid.col3[1]
Form.mygrid.original.col3[1]
Form.mygrid.RowStatus.Action[2]
Form.mygrid.col2[2]
Form.mygrid.original.col2[2]
The remaining cells in the arrays (for example, Form.mygrid.col2[1] and Form.mygrid.original.col2[1]) have the
original, unchanged values.
Description
Stores the new values of inserted, deleted, or updated cells. (Entries for deleted cells contain
empty strings.)
Stores the original values of inserted, deleted, or updated cells.
Stores the type of change made to the grid rows: D for delete, I for insert, or U for update.
cfgrid
Last updated 1/20/2012
tag called mygrid that consists of two displayable
735

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents