Changes between Version 5 and Version 6 of QuickStart/4:HandlingaForm
- Timestamp:
- 09/03/09 18:39:08 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
QuickStart/4:HandlingaForm
v5 v6 50 50 Still nothing? There's one last piece to the puzzle: write a !TranslatePhrase function in the Controller that asks our Model to translate a phrase! That's easy enough - just open /translator/controller/Controller.cfc and add the following <cffunction>: 51 51 52 (Note: for CF9, use addTraceStatement() instead of trace() )53 54 52 {{{ 55 53 <cffunction name="TranslatePhrase" access="public" returntype="void" output="false"> … … 60 58 <cfset var result = translator.translate(phrase) /> 61 59 62 <cfset arguments.event. trace("TranslatePhrase Results", result) />60 <cfset arguments.event.addTraceStatement("TranslatePhrase Results", result) /> 63 61 <cfset arguments.event.setValue("translatedPhrase", result) /> 64 62 </cffunction> 65 63 }}} 64 65 (Note that in prior versions of the framework, the addTraceStatement() function was named trace(), but this was changed in order to support !ColdFusion 9, which was added a native trace() function to CFML.) 66 66 67 67 So what does all that do?
![(please configure the [header_logo] section in trac.ini)](/ModelGlue.com/trac.cgi/chrome/site/your_project_logo.png)