Whenever you update the configuration or value of the control, the form invokes the ControlWrapper.refresh() method to give the ControlWrapper a chance to update the rendering of the control.
When you configure the control in the Always Render mode, the form creates an instance of the ControlWrapper for each cell in the grid table. Users can view the rendering that happens at this point.
When you do not configure the control in the Always Render mode (default), the form creates a single ControlWrapper instance that is shared between the cells in a grid table column. Users cannot view the rendering that happens at this point. The form does not attach the parent node to the DOM at this point but invokes the
ControlWrapper.getFormattedValue() method for each visible cell in the column of the grid table.
When you configure the control in the Always Render mode, the form calls the
refresh() method as soon as the value or other configuration settings are changed.
When you do not configure the control in the Always Render mode and focus on a cell to edit the value, the form calls the
ControlWrapper.refresh() method to allow the ControlWrapper to update the rendering and reflect the current value being edited. If you change any of the configuration settings after the last
refresh(), the wrapper is notified through the
updates argument.
If a control manages a complex value, the static compare() method on the ControlWrapper class is called each time user sorts the grid on that column.
When you configure the control in Always Render mode, the form invokes the
destroy() method on all instances of the ControlWrapper when the form is being taken out of service or on the specific instance when that row is deleted from the table.
If you do not configure the control in the Always Render mode, the form invokes the
destroy() method on the shared instance of the ControlWrapper only when the form is being taken out of service.