cbmessagebox

Render and manage typed flash messages for ColdBox views and handlers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many ColdBox applications need a reliable, consistent way to show one-time flash notifications across redirects and views; cbmessagebox centralizes message setting, checking, rendering, and clearing so notifications behave predictably in layouts and forms.

Core Features & Use Cases

  • Typed flash messages: set info, success, warning, and error messages from handlers and services.
  • Layout-friendly rendering: render all messages once in a main layout or render specific types near forms.
  • Programmatic control: check for messages, clear specific types or all messages, and customize output templates for frameworks like Bootstrap.
  • Use Case: after a successful save, set a success message and relocate so the layout displays a dismissible Bootstrap alert.

Quick Start

Set a success flash message and redirect so the main layout can render it as a Bootstrap-compatible alert.

Frequently Asked Questions about cbmessagebox

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

FAQPage Schema
How do I show flash messages in ColdBox after a redirect?

Flash messages in ColdBox are displayed after a redirect by setting a typed message in the handler, relocating the request, and rendering the stored output in the layout. This Skill manages the flash scope so notifications persist across the redirect and render consistently.

What is the best way to render Bootstrap alert notifications in BoxLang views?

Rendering Bootstrap alert notifications in BoxLang views is handled by placing a render command in the main layout. The Skill provides customizable, Bootstrap-compatible templates to automatically format typed info, success, warning, and error messages into dismissible alerts.

Can I set specific message types like error or warning from a ColdBox service?

Yes, you can set specific info, success, warning, and error message types directly from ColdBox handlers and services. The Skill supports injecting the message box service into your components to programmatically append typed flash messages.

How do I clear flash messages programmatically before they render in ColdBox?

Flash messages are cleared programmatically by calling specific clearing functions provided by the Skill. You can target and remove specific message types or clear all messages at once before the layout renders them, ensuring precise control over notification display.

Does cbmessagebox work for post-redirect-get notifications and form validation feedback?

Yes, cbmessagebox is designed for post-redirect-get notifications and form validation feedback in ColdBox. It centralizes message setting and rendering, allowing you to display CRUD feedback and validation errors near forms or in global layouts.

Why are my ColdBox flash messages displaying multiple times or not clearing?

ColdBox flash messages may display multiple times if they are not programmatically cleared or rendered as one-time notifications. This Skill ensures messages are rendered once and provides explicit functions to clear specific types or all messages after display.