dependency
protected inline fun <TDependency> dependency(path: Path, dependencyKey: String? = null): PropertyDelegateProvider<ComputedValue<T>, ReadOnlyProperty<ComputedValueContext, TDependency>>(source)
protected inline fun <TDependency> dependency(path: String, dependencyKey: String? = null): PropertyDelegateProvider<ComputedValue<T>, ReadOnlyProperty<ComputedValueContext, TDependency>>(source)
Function used to declare a dependency to a path and delegate access to its value within a ComputedValueContext.
If the dependency could not be found in the form during the execution of the computed value, then accessing this dependency will throw DependencyNotFoundException.
It should be used as follows:
private val ComputedValueContext.dependencyKey: Type by dependency(path)Content copied to clipboard
Computed value dependency paths may contain a single recursive wildcard at the end, indicating that the computed value should be reevaluated by the form manager whenever a child value of the dependency changes. Otherwise, a dependency must contain no wildcards.