coldbox-event-model

Manage ColdBox event lifecycle, rc/prc data, rendering, redirects, and HTTP status.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill coldbox-event-model
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coldbox-event-model
Source: https://github.com/ColdBox/skills/tree/main/coldbox/event-model
Command: npx skills add https://github.com/ColdBox/skills --skill coldbox-event-model

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ColdBox applications often need consistent patterns to manage the event lifecycle, request data (rc/prc), and response control across handlers.

Core Features & Use Cases

  • Manage the ColdBox event lifecycle and response handling.
  • Access and mutate rc and prc to drive view rendering and REST data.
  • Render views with event.setView() and return REST data with event.renderData(), including redirects and HTTP status management.
  • Apply event caching to improve performance for repetitive requests.

Quick Start

Create a handler that uses event, rc, and prc to render a view and optionally cache the output.

Frequently Asked Questions about coldbox-event-model

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage the ColdBox event lifecycle and coordinate rc and prc data flows across handlers?

You can manage the ColdBox event lifecycle by accessing and mutating rc and prc within handlers to coordinate request data flows, driving both view rendering and REST data responses consistently across the application.

How do I render views and return REST data in a ColdBox handler?

To render views and return REST data in ColdBox, use event.setView() for view rendering and event.renderData() for REST data responses, allowing you to control output format and HTTP status within the same handler.

What is event caching in ColdBox and when should I apply it?

Event caching in ColdBox stores the output of rendered events to improve performance for repetitive requests. Apply event caching when you have handler events generating static or semi-static content to reduce processing overhead.

How do I handle redirects and HTTP status codes using the ColdBox event model?

Handle redirects and HTTP status codes in the ColdBox event model by using event relocation methods for redirects and configuring HTTP status responses during event rendering to control client communication precisely.

Can I use ColdBox event model patterns to satisfy functional requirements for REST API endpoints?

Yes, you can use ColdBox event model patterns for REST API endpoints by leveraging event.renderData() to output structured data and managing HTTP status codes, satisfying functional requirements for REST data handling and response control.

What is the difference between rc and prc in ColdBox request data handling?

In ColdBox request data handling, rc represents the request collection containing URL and form variables, while prc is the private request collection used for handler-specific data, ensuring view rendering and REST data flows remain cleanly separated.