CBWIRE 4.1 introduces full BoxLang support, allowing you to build components and templates using BoxLang's powerful, modular, and modern feature set. This opens up a whole new world of possibilities for CBWIRE development with BoxLang's enhanced syntax and capabilities.
BoxLang brings modern language features like enhanced member functions, improved syntax, and better type handling to your CBWIRE components.
Assets Management
CBWIRE 4.1 introduces <cbwire:script> and <cbwire:assets> functionality for better control over component-specific assets. These assets are automatically tracked throughout the request and appended to the <head> tag during page load.
Locked Data Properties
Protect sensitive data properties from client-side modifications by defining a locked variable in your component. This prevents certain properties from being updated via wire:model or other client interactions.
Module Root URL Configuration
Configure custom module root URLs for better control over CBWIRE routing in complex applications.
File Upload Enhancement
New getTemporaryStoragePath() method in FileUpload components provides access to temporary file storage locations.
Progress Bar Customization
Enhanced progress bar configuration with proper color setting and disable functionality.
String Trimming
Automatically trim whitespace from string values in form inputs.
External Module Support
Load CBWIRE components from external module locations for better code organization.
Update Endpoint Configuration
Customize the CBWIRE update endpoint for advanced routing scenarios.
Enhancements
Asset Rendering Optimization
Assets are now tracked throughout the request and only rendered once
Component-specific assets are automatically injected into the <head> tag
Prevents duplicate asset loading for better performance
Performance Improvements
CBWIRE rendering speed improvements
Enhanced child/nested component tracking
Optimized asset management and injection
Bug Fixes
Component Lifecycle
Fixed onRender() method: Restored missing onRender() method from previous versions
Fixed onUpdate() behavior: Resolved issue where onUpdate() was called when no updates occurred
Component Management
Child/nested component tracking: Improved tracking of child components in Livewire
Component isolation: Better handling of component isolation and lazy loading
Asset Management
Duplicate asset prevention: Assets that have already been rendered are not returned again
Asset injection: Component assets are properly tracked and injected into page head
External Module Support
Module loading: Fixed issues loading wires from external module locations
Path resolution: Improved component path resolution for complex module structures
<!-- Template can bind to name/email but userId/role are protected -->
<input wire:model="name" placeholder="Name">
<input wire:model="email" placeholder="Email">
<!-- These would throw "Locked properties cannot be updated" if attempted -->
// wires/FileManager.bx
class extends="cbwire.models.Component" {
function processUpload() {
if (data.upload) {
var tempPath = data.upload.getTemporaryStoragePath();
// Process file at temporary location
}
}
}
// wires/FileManager.cfc
component extends="cbwire.models.Component" {
function processUpload() {
if (structKeyExists(data, "upload")) {
var tempPath = data.upload.getTemporaryStoragePath();
// Process file at temporary location
}
}
}