Computed Properties
Create dynamic properties for your UI Wires.
Last updated
Was this helpful?
Create dynamic properties for your UI Wires.
Last updated
Was this helpful?
If you are on CBWIRE version 2.3.x and have enabled the configuration property useComputedPropertiesProxy, then you will need to follow instead as this fundamentally changes how computed properties are referenced and accessed.
Computed Properties are dynamic properties and are helpful for deriving values from a database or another persistent store like a cache.
Computed Properties are similar to with some key differences:
They are declared as inline functions using computed
.
They can return any type of CFML value or object, not just values that can be serialized and parsed by JavaScript like Data Properties.
See the page for details on when Computed Properties are executed.
You can define Computed Properties on your using computed
. Each Computed Property is invoked only once during a single request cycle.
Getters are automatically created based on the property's name.
In the example below, you to access the property using this.getAllTasks()
. You can use this as an alternative to using computed
.
You can access your Computed Properties from within your using computed.[propertyName]
.
You can access Computed Properties in your via the args
scope.