| | 1 | = Customizing Generated CFML = |
| | 2 | |
| | 3 | Scaffold tags cause certain files to be generated, such as lists, views, and edit forms. This generated code is placed into a directory governed by the !ScaffoldPath property of the !ModelGlueConfigurationBean in !ColdSpring.xml. |
| | 4 | |
| | 5 | ''Advanced note: The value of this setting is appended to the !ViewMappings setting, making this directory the last-searched directory when an include tag is encountered.''' |
| | 6 | |
| | 7 | By default, the following .CFM templates are generated for each scaffolded table: |
| | 8 | |
| | 9 | 1. dsp''Table''List.cfm - Displays a list of records from the table |
| | 10 | 1. dsp''Table''.cfm - Displays a single record from the table |
| | 11 | 1. frm''Table''.cfm - Displays an edit form for a single record from the table |
| | 12 | |
| | 13 | To customize the generated CFML, you cannot edit these files directly. This would cause them to be overwritten the next time the framework is reloaded. |
| | 14 | |
| | 15 | To edit a view, simply copy it into the /views directory of your application. At that point, your copy will not be overwritten. If additional database columns are added, you'll be able to use the generated code as a source from which you can copy and paste the new column's CFML. |
| | 16 | |
| | 17 | ''Advanced note: They can alternatively be copied into any directory listed in the !ViewMappings setting'' |