Changes between Version 2 and Version 3 of Training/Section07
- Timestamp:
- 12/29/09 21:41:01 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Training/Section07
v2 v3 9 9 1. First, let's visit a fictitious Event Handler: 10 10 11 [http://localhost/PlantOMatic?event=Plant.Search http://localhost/PlantOMatic?event=Plant.Search]11 [http://localhost/PlantOMatic?event=Plant.Search http://localhost/PlantOMatic?event=Plant.Search] 12 12 13 ''We'll get an error telling us no event named "Plant.Search" is defined.''13 ''We'll get an error telling us no event named "Plant.Search" is defined.'' 14 14 15 15 2. Next, open /PlantOMatic/config/ColdSpring.xml and find the definition for modelglue.modelGlueConfiguration. Then Locate the setting for generationEnabled and change it from: … … 21 21 }}} 22 22 23 To:23 To: 24 24 25 25 {{{ … … 30 30 31 31 32 ''Now, each time you request an undefined Model-Glue Event Handler, Model-Glue will generate Model-Glue XML definitions, Controller bodies and methods and views. This is a powerful feature and should only be enabled when you wish to generate new code. Model-Glue does not distinguish typos from intent, so be careful!''32 ''Now, each time you request an undefined Model-Glue Event Handler, Model-Glue will generate Model-Glue XML definitions, Controller bodies and methods and views. This is a powerful feature and should only be enabled when you wish to generate new code. Model-Glue does not distinguish typos from intent, so be careful!'' 33 33 34 34 3. Simply refresh the page, and Model-Glue will generate a bunch of free code to support our new Plant.Search functionality … … 41 41 == New Files: == 42 42 43 /PlantOMatic/views/Plant/Search.cfm43 * /PlantOMatic/views/Plant/Search.cfm 44 44 45 45 == Changed Files: == 46 46 47 /PlantOMatic/config/ModelGlue.xml48 * New Event Handler: Plant.Search47 * /PlantOMatic/config/ModelGlue.xml 48 * New Event Handler: Plant.Search 49 49 50 /PlantOMatic/controller/PlantController.cfc 51 * New Method: Search() 52 * '' '''Note:''' if !PlantController did not already exist, Model-Glue would have created it for us '' 53 50 * /PlantOMatic/controller/PlantController.cfc 51 * New Method: Search() 52 * '' '''Note:''' if !PlantController did not already exist, Model-Glue would have created it for us '' 54 53 55 54 == Event Generation Clean Up == 56 55 57 56 1. Delete These Files 57 * /PlantOMatic/views/Plant (the whole directory) 58 58 59 /PlantOMatic/views/Plant (the whole directory) 60 61 2. '''Update The Model-Glue XML Event Handler for Plant.Search''' 59 2. Update The Model-Glue XML Event Handler for Plant.Search 62 60 63 61 {{{
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)