Alternative to getValueHost() and companion functions that returns strongly typed valuehosts in a shortened syntax. Always throws exceptions if the value host requested is unknown or not the expected type.
Readonly
servicesTypecast from IServices
If the user needs to abandon this instance, they should use this to clean up active resources (like timers) and to release memory that would stall the garbage collector from disposing this object. It should assign any object reference to undefined as a strong indicator that the object has been disposed.
Retrieves the ValueHost of the identified by valueHostName
Matches to the ValueHostBaseConfig.name property Returns the instance or null if not found.
Retrieves the CalcValueHost of the identified by valueHostName
Matches to the CalcValueHostConfig.name property Returns the instance or null if not found or found a different type of value host.
Retrieves the StaticValueHost of the identified by valueHostName
Matches to the StaticValueHostConfig.name property Returns the instance or null if not found or found a different type of value host.
Provides a way to enumerate through existing ValueHosts.
Optional
filter: ((valueHost) => boolean)A generator that yields ValueHosts
Adds a ValueHostConfig for a ValueHost not previously added. Does not trigger any notifications. Exception when the same ValueHostConfig.name already exists.
Can use builder.static(), builder.calc() or any ValueConfigHost. (builder is the Builder API)
When not null, this state object is used instead of an initial state. It overrides any state supplied by the ValueHostsManager constructor. It will be run through ValueHostFactory.cleanupInstanceState() first. When null, the state supplied in the ValueHostsManager constructor will be used if available. When neither state was supplied, a default state is created.
Replaces a ValueHostConfig for an already added ValueHost. It does not merge. If merging is required, use addOrMergeValueHost(). Does not trigger any notifications. If the name isn't found, it will be added. Any previous ValueHost and its config will be disposed. Be sure to discard any reference to the ValueHost instance that you have.
Can use builder.static(), builder.calc() or any ValueConfigHost. (builder is the Builder API)
When not null, this state object is used instead of an initial state. It overrides any state supplied by the ValueHostsManager constructor. It will be run through ValueHostFactory.cleanupInstanceState() first.
Replaces a ValueHostConfig for an already added ValueHost. It merges the new config with the existing one using the ValueHostConfigMergeService. The goal is to protect important business logic settings while allowing the UI to inject new property values where appropriate. Does not trigger any notifications. If the name isn't found, it will be added. Any previous ValueHost and its config will be disposed. Be sure to discard any reference to the ValueHost instance that you have.
Can use builder.static(), builder.calc() or any ValueConfigHost. (builder is the Builder API)
When not null, this state object is used instead of an initial state. It overrides any state supplied by the ValueHostsManager constructor. It will be run through ValueHostFactory.cleanupInstanceState() first.
Easier way to add or modify a ValueHostConfig than using addValueHost(), addOrUpdateValueHost(), or addOrMergeValueHost(). It returns an object whose methods allow adding ValueHosts and their validators. Upon calling its apply() method, your changes will be applied through the addOrMergeValueHost() function. Any ValueHost that gets updated will have its original instance disposed. Be sure to discard any reference to the ValueHost instance that you have.
Upon changing the value of a ValueHost, other ValueHosts need to know. They may have Conditions that take the changed ValueHost into account and will want to revalidate or set up a state to force revalidation. This goes through those ValueHosts and notifies them.
Report that a ValueHost had its instance state changed. Invokes onValueHostInstanceStateChanged if setup.
Generated using TypeDoc v0.25.12
Provides a container for ValueHosts that can be used when working with a model or form. Ultimately in Jivs, it serves the ValueHostsManager, but can work stand-alone. Conditions are passed the ValueHostsManager meaning they can be used independently of validation.