Blog

Brad Wood

August 23, 2012

Spread the word


Share your thoughts

The methods in your handlers (actions) have always accepted the "event" object, which is the request context for that event and contains things like the request collection and private request collection.

A common handler method used to look like this:

function index(event) {
  var rc = event.getCollection();
  var prc = event.getCollection(private=true);
  // Do Stuff
}


Remember, if you're using ColdBox 3.1 or higher, every action is now passed a reference to the request collection (rc) and private request collection (prc) as arguments so you don't have to get them yourself.

function index(event,rc,prc){
  rc.foo = "Isn't this convenient?";
  prc.bar = "Yes, yes it is.";
}


Remembering this tip can help clean up your code by omitting those uneccessary boilerplate lines of code to get the rc and prc.

More info here: http://wiki.coldbox.org/wiki/EventHandlers.cfm#Anatomy_of_an_Event_Handler_Action

Add Your Comment

Recent Entries

ColdBox 8.1.0 Released — AI Routing, MCP, and BoxLang-First Power! 🚀

ColdBox 8.1.0 Released — AI Routing, MCP, and BoxLang-First Power! 🚀

We are thrilled to announce ColdBox 8.1.0, a targeted minor release packed with powerful new features, important improvements, and critical bug fixes across ColdBox, WireBox, and CacheBox. While minor in version number, this release delivers some truly exciting capabilities — especially for BoxLang developers building AI-powered applications.

Luis Majano
Luis Majano
April 14, 2026
ColdFusion Modernization for UK Universities Without Downtime

ColdFusion Modernization for UK Universities Without Downtime

Across the United Kingdom, many universities still rely on legacy ColdFusion and CFML systems to power student portals, enrollment platforms, research databases, payment gateways, and internal academic workflows.

These systems are often:

  • 15 to 25 years old
  • Mission-critical
  • Deeply integrated with student information systems
  • Running on older Adobe ColdFusion or Lucee versions
  • Tightly coupled monolithi...

Cristobal Escobar
Cristobal Escobar
April 13, 2026