coldbox-event-modellisted
Install: claude install-skill ColdBox/skills
# ColdBox Event Model
## When to Use This Skill
Use this skill when working with the ColdBox request lifecycle, event object, request collections, view rendering, and response management.
## Language Mode Reference
Examples use **BoxLang (`.bx`)** syntax by default. Adapt for your target language:
| Concept | BoxLang (`.bx`) | CFML (`.cfc`) |
|---------|-----------------|---------------|
| Class declaration | `class [extends="..."] {` | `component [extends="..."] {` |
| DI annotation | `@inject` above `property name="svc";` | `property name="svc" inject="svc";` |
| View templates | `.bxm` suffix | `.cfm` / `.cfml` suffix |
| Tag prefix | `<bx:if>`, `<bx:output>`, `<bx:set>` | `<cfif>`, `<cfoutput>`, `<cfset>` |
> **CFML Compat Mode**: With BoxLang + CFML Compat module, `.bx` and `.cfc` files coexist freely. BoxLang-native classes use `class {}` (`.bx` files); CFML-compat classes use `component {}` (`.cfc` files).
## Core Concepts
The ColdBox event model consists of:
- **Event Object** (`event`) — the `RequestContext` instance per request
- **Request Collection** (`rc`) — public request data (merged GET + POST + URL params)
- **Private Request Collection** (`prc`) — private handler-to-view data store
- **View Rendering** — `event.setView()` for HTML, `event.renderData()` for data
- **Relocations** — `relocate()` for redirects
## Request Collections
```boxlang
function index( event, rc, prc ) {
// rc = public request collection (from URL, FORM, etc.)
var user