Seaside components have the ability to specify that another component should be rendered (usually temporarily) in their place. This mechanism is triggered by the message
call:. During callback processing, a component may send the message
call: with another component as an argument. The component passed as an argument in this way can be referred to as the delegate. The
call: method has two effects:
- In subsequent rendering cycles, the delegate will be displayed in place of the original component. This continues until the delegate sends the message
- The current execution state of the calling method is suspended and does not return a value yet. Instead, Seaside renders the web page in the browser (showing the delegate in place of the original component).
The delegate may be a complex component with its own control flow and state. If the delegate component later sends the message
answer, then execution of the (currently suspended) calling method is resumed at the site of the
call:. We will explain this mechanism in detail after an example.
From the point of view of a component, it calls another component and that component will (eventually) answer.