Configuration

Change the internal behavior of CBWIRE as needed.

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 = {
                "autoInjectAssets": false,
                "maxUploadSeconds": 5 * 60, // 5 minutes
                "throwOnMissingSetterMethod" : false,
                "trimStringValues": false,
                "wiresLocation": "wires"
            }
        };
     }
}

Overriding the module settings is optional.

autoInjectAssets

Set as true to automatically include CBWIRE'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. In the next major release, this will default to true. 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 component. 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 components are stored. Defaults to 'wires'.

Last updated