onRender(renderContext)

Invoked when a canvas app is rendered. Provides the ability to set and retrieve canvas application and environment context information during the application render phase.

Signature

public void onRender(Canvas.RenderContext renderContext)

Parameters

renderContext
Type: Canvas.RenderContext

Return Value

Type: Void

Usage

If implemented, this method is called whenever the canvas app is rendered. The implementation can set and retrieve context information by using the provided Canvas.RenderContext.

This method is called whenever signed request or context information is retrieved by the client. See the Force.com Canvas Developer’s Guide for more information on signed request authentication.

Example

This example implementation prints ‘Canvas lifecycle called.’ to the debug log when the canvas app is rendered.

public void onRender(Canvas.RenderContext renderContext) {
    System.debug('Canvas lifecycle called.');
}
Previous
Next