| | 1 | = Customizing Scaffold .XSL Files = |
| | 2 | |
| | 3 | It's possible to entirely change the View CFML that scaffold tags generate. All involve editing .XSL files, which is way beyond the scope of this guide, but not altogether complicated. |
| | 4 | |
| | 5 | There are three ways to customize the .XSL: |
| | 6 | |
| | 7 | == Editing Default .XSL files == |
| | 8 | |
| | 9 | If you explore the /!ModelGlue/unity/xsl directory, you'll see that there are .XSL files that define the CFML to be generated when a like-named scaffold is added to an application. |
| | 10 | |
| | 11 | Editing these directly changes the behavior of all of your Model-Glue applications. |
| | 12 | |
| | 13 | == Creating New .XSL files == |
| | 14 | |
| | 15 | By creating your own .XSL files, you can again change the behavior of all scaffolds in all Model-Glue applications. To "tell" a given scaffold to use your custom .XSL file, do the following: |
| | 16 | |
| | 17 | 1. Open /!ModelGlue/unity/config/Configuration.xml |
| | 18 | 1. Find the "eventHandlerFactory" bean |
| | 19 | 1. In the map that defines the !EventHandlerTypes constructor argument, change the .xsl files listed to point to your custom .XSL files |
| | 20 | |
| | 21 | Editing these directly changes the behavior of all of your Model-Glue applications. |
| | 22 | |
| | 23 | == Application-specific .XSL files == |
| | 24 | |
| | 25 | To change the .XSL files used by a single Model-Glue applications, copy the entire !EventHandlerFactory bean from /!ModelGlue/unity/config/Configuration.xml into your application's !ColdSpring.xml file. |
| | 26 | |
| | 27 | Then, follow the instructions in "Creating New .XSL Files," editing your !ColdSpring.xml's !EventHandlerFactory settings instead of those found in /!ModelGlue/unity/config/Configuration.xml. |