This page explains how component plug-ins work with interface variables and the interface evaluation lifecycle. You should have a good understanding of how to work with components and variables. For more advanced background you can read about the details of the interface evaluation lifecycle.
The key events in a component's lifecycle are:
Your component can be loaded in two ways:
showWhen becomes true)
When your component is loaded:
Your component will continue to execute as long as it's visible on the interface. If your component is hidden and then shown again or if the entire interface is reloaded, then a new instance of the component is loaded by the interface.
Parameter values can change as the user interacts with the rest of the interface (for example, the user updates another field that saves its value into a local variable used by your component).
The entire process looks like this:
All parameter values are passed in, not just the updated values. If you need to identify the values that changed you'll need to track current parameter values in your code for comparison.
Users can interact with your component in many ways. Depending the design of your component, users might be able to:
When users interact with your component you can save updated values back to the interface so that those values can be used by other components or can be passed to a smart service function.
The process of saving a value looks like this:
a!save() expressions, or smart service function specified for that parameter.
Warning: Avoid creating loops when saving values.