Class ClientRenderer
The ClientRenderer handles the registration and inserting of new components from the server.
If a component takes too long to be obtained from the server, a placeholder is used to show
that the component is still loading.
This works for all transport layers.
Constructor
-
class ClientRenderer()
Methods
get
-
ClientRenderer.get()
Returns ClientRenderer: |
| the singleton instance |
Returns the class’ singleton instance.
renderComponent
-
ClientRenderer#renderComponent(component)
Arguments: |
- component (Object) – the rendered component
|
Renders the component to the DOM and registers it.
This method takes care of rendering orphaned components (components rendered inside a
a container which get sent to the client before their placeholder div).
renderPlaceholder
-
ClientRenderer#renderPlaceholder(instanceId)
Arguments: |
- instanceId (String) – the instanceId of the component for the placeholder
|
Renders the placeholder.
requestComponent
-
ClientRenderer#requestComponent(component)
Arguments: |
- component (Object) – the information about the requested component
|
Requests a component over websockets.
setPlaceholder
-
ClientRenderer#setPlaceholder(component)
Arguments: |
- component (Object) – the whole rendered placeholder component
|
Sets the placeholder component.
setPlaceholderTimeout
-
ClientRenderer#setPlaceholderTimeout(milliseconds)
Arguments: |
- milliseconds (Number) – time in milliseconds
|
Sets the placeholder timeout which is set from the server configuration.