![MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Скачать руководство пользователя страница 102](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-cfml-language/coldfusion-4-5-cfml-language_reference_3287257102.webp)
78
CFML Language Reference
Usage
You can populate a CFGRID with data from a
CFQUERY
. If you do not specify any
CFGRIDCOLUMN
entries, a default set of columns is generated. Each column in the
query is included in the default column list. In addition, a default header for each
column is created by replacing any hyphen (-) or underscore (_) characters in the table
column name with spaces. The first character and any character after a space is
changed to uppercase; all other characters are lowercase.
Select mode and form variables
Grid data is submitted in a CFFORM as form variables, depending on the value of the
SELECTMODE attribute as follows:
•
When SELECTMODE="Single", grid data is returned as
grid_name.selectedname and the value of the selected cell.
•
When SELECTMODE="Column", grid data is returned as a comma-separated
list of all the values for the selected column.
•
When SELECTMODE="Row", grid data is returned as grid_name.colum1_name
and grid_name.column2_name and their respective values for the selected row.
•
When SELECTMODE="Browse", no selection data is returned.
Using SELECTMODE="Edit"
When SELECTMODE=“Edit ", one-dimensional arrays are used to store data about
changes to the grid cells. For example, a one-dimensional array is used to store the
type of edits made to grid cells:
gridname.RowStatus.Action [ value ]
Where gridname is the name of the CFGRID and action is U, I, or D for Update, Insert,
and Delete, respectively.
ColdFusion also maintains both the value of the edited cell and the original value in
one-dimensional arrays. You can reference this data in ColdFusion expressions as
follows:
gridname.colname[ value ]
gridname.original.colname[ value ]
Where gridname is the name of the CFGRID, colname is the name of the column, and
value is the index position containing the grid data.
Using the HREF attribute
When specifying a URL with grid items using the HREF attribute, the value of the
SELECTMODE attribute determines whether the appended key value is limited to a
single grid item or whether it extends to a grid column or row. When a user clicks on a
linked grid item, a CFGRIDKEY variable is appended to the URL in the following form:
http://myserver.com?CFGRIDKEY=selection
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...