Configuration

Overview

You can alter CBWIRE and Livewire's default behavior by overriding settings in your config/ColdBox.cfc file.

// ./config/ColdBox.cfc
component{
    function configure() {
        moduleSettings = {
            "cbwire" = {
                "autoInjectAssets": false,
                "maxUploadSeconds": 5 * 60, // 5 minutes
                "throwOnMissingSetterMethod" : false,
                "trimStringValues": false,
                "wiresLocation": "wires",
                "updateEndpoint": "/cbwire/updates",
                "showProgressBar": true,
                "progressBarColor": "##2299dd"
            }
        };
     }
}

Overriding the module settings is optional.

autoInjectAssets

Automatically include Livewire's CSS and JavaScript assets. This removes the need to manually add references to wireStyles() in your <head> and wireScripts() at the end of </body> in your ColdBox layout file. Defaults to true.

maxUploadSeconds

The maximum amount of time allowed for uploads to complete.

trimStringValues

When set to true, any data properties that contain strings will be automatically trimmed on updates. Great for form inputs. Defaults to false.

You can enable it directly on your components if you don't want to set this globally.

component extends="cbwire.models.Component" {
    trimStringValues = true;
    data = {
        "name": ""  
    };
}

wiresLocation

The relative folder path where components are stored. Defaults to 'wires'.

updateEndpoint

Sets the URI endpoint where CBWIRE posts its updates to the server. You might need to change this if you do not have URL rewriting enabled.

{
    "updateEndpoint": "/index.cfm/cbwire/update"
}

showProgressBar

When set to true, it displays a progress bar at the top of the page using wire:navigate to load pages. Defaults to true. Set to false to disable the progress bar altogether.

progressBarColor

Use to adjust the progress bar color when using wire:navigate.

Last updated