setView()method in the request context object.
setView()method to set the view
views/general/index.cfmto be rendered. Now the cool thing about this, is that we can override the view to be rendered anytime during the flow of the request. So the last process to execute the
setView()method is the one that counts. Also notice a few things:
.cfmextension is needed.
viewsor in your configured external locations
main.cfm) will be used.
layoutargument or the
moduleargument alongside any other argument combination:
event.noRender()method. Maybe you just took some input and need to gracefully shutdown the request into the infamous white screen of death.
event.setView()if you want, ColdBox will then look for the view according to the executing event's syntax by convention. So if the incoming event is called
general.indexand no view is explicitly defined in your handler, ColdBox will look for a view in the
index.cfm. That is why we recommend trying to match event resolution to view resolution even if you use or not implicit views.
coldbox.implicitViewsconfiguration setting in your
config/ColdBox.cfc. This is useful as implicit lookups are time-consuming.
coldbox.caseSensitiveImplicitViewsdirective in your
config/ColdBox.cfc. The default is to turn all implicit views to lower case, so the value is always false.