hello.cfcinside of the
hello.indexoutputted to the screen. You have now created your first handler and view combination.
index()which receives three arguments:
event- An object that models and is used to work with the current request
rc- A struct that contains both
URL/FORMvariables (unsafe data)
prc- A secondary struct that is private only settable from within your application (safe data)
hello.cfc) and method that was generated
index(). By convention, this is how you execute events in ColdBox by leveraging the following URL pattern that matches the name of a handler and action function.
actionis defined in the URL then the default action of
indexwill be used.
config/Router.cfcwhich is your application router.
/views/virtual/hello.cfm) and add the following:
Hello From ColdBox Land!displayed! This is a great way to create tests or even bring in legacy/procedural templates into an MVC framework.