Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfcomponent >
- <cffunction name="saveFirstName" output="false" >
- <cfargument name="firstName" type="string" required="true" />
- <cfdump var="#arguments#" label="arguments" /><cfabort>
- <cfscript>
- local.out = {};
- local.out.errors = {};
- local.out.success = true;
- if (len(trim(arguments.firstName)) is 0) {
- local.out.errors.firstName = "Required.";
- local.out.success = false;
- } else {
- // Here, we would call the model.
- }
- return local.out;
- </cfscript>
- </cffunction>
- <cfscript>
- function saveLastName ( string name ) {
- // Here, we would call the model.
- }
- </cfscript>
- <cffunction name="OnMissingMethod" access="public" returntype="any" output="false" hint="Handles missing method exceptions.">
- <cfargument name="MissingMethodName" type="string" required="true" hint="The name of the missing method." />
- <cfargument name="MissingMethodArguments" type="struct" required="true" hint="The arguments that were passed to the missing method. This might be a named argument set or a numerically indexed set." />
- <cfdump var="#arguments#" label="Missing Method Arguments" />
- <cfabort />
- <cfreturn />
- </cffunction>
- </cfcomponent>
Advertisement
Add Comment
Please, Sign In to add comment