Configuration

Alter CBWIRE's behavior with these nifty configuration options.

ColdBox.cfc

You can alter any default behavior by overriding settings in your config/ColdBox.cfc file.

// File: ./config/ColdBox.cfc
component{
    function configure() {
        moduleSettings = {
            cbwire = {
                "enableTurbo": false,
                "maxUploadSeconds": 5 * 60, // 5 minutes
                "throwOnMissingSetterMethod" : false,
                "trimStringValues": false,
                "wiresLocation": "myWires",
                "useComputedPropertiesProxy": false
            }
        };
     }
}

Overriding the module settings is optional. All settings come with a default that is used if no overrides are provided. See Overriding Module Settings in the ColdBox documentation for additional reference.

enableTurbo

Set as true to enable Turbo, which causes any clicked links or form submissions to be performed in the background via AJAX and updates the DOM without reloading the page. Great when developing single-page, VueJS-like applications. Defaults to false.

maxUploadSeconds

The maximum amount of time allowed for uploads to complete.

throwOnMissingSetter

Set as true to throw a WireSetterNotFound exception if the incoming wire request tries to update a property without a setter on our Wire. Otherwise, missing setters are ignored. Defaults to false.

trimStringValues

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

wiresLocation

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

useComputedPropertiesProxy

When set to true, Computed Properties will be proxied. See Computed Properties (Proxied).

Last updated