ima ⇐ AbstractPageRenderer 

Server-side page renderer. The renderer renders the page into the HTML markup and sends it to the client.

Extends: AbstractPageRenderer
Implements: PageRenderer
Submodule: ima.page


ima~ServerPageRenderer 

Kind: inner class of ima


new ServerPageRenderer(factory, Helper, ReactDOMServer, dispatcher, settings, response, cache) 

Initializes the server-side page renderer.

Param Type Description
factory PageRendererFactory Factory for receive $Utils to view.
Helper vendor.$Helper The IMA.js helper methods.
ReactDOMServer vendor.ReactDOMServer React framework instance to use to render the page on the server side.
dispatcher Dispatcher Dispatcher fires events to app.
settings Object.<string, \*> Application setting for the current application environment.
response Response Utility for sending the page markup to the client as a response to the current HTTP request.
cache Cache Resource cache caching the results of HTTP requests made by services used by the rendered page.

serverPageRenderer._response : Response 

Utility for sending the page markup to the client as a response to the current HTTP request.

Kind: instance property of ServerPageRenderer


serverPageRenderer._cache : Cache 

The resource cache, caching the results of all HTTP requests made by the services using by the rendered page. The state of the cache will then be serialized and sent to the client to re-initialize the page at the client side.

Kind: instance property of ServerPageRenderer


serverPageRenderer._getRevivalSettings() ⇒ string 

The javascript code will include a settings the “revival” data for the application at the client-side.

Kind: instance method of ServerPageRenderer
Returns: string - The javascript code to include into the rendered page.


serverPageRenderer._wrapEachKeyToPromise([dataMap]) ⇒ Object.<string, Promise> 

Creates a copy of the provided data map object that has the values of its fields wrapped into Promises.

The the values that are already Promises will referenced directly without wrapping then into another Promise.

Kind: instance method of ServerPageRenderer
Returns: Object.<string, Promise> - A copy of the provided data map that has all its values wrapped into promises.

Param Type Default Description
[dataMap] Object.<string, \*> {} A map of data that should have its values wrapped into Promises.

serverPageRenderer._renderPage(controller, view, pageState, routeOptions) ⇒ Object 

Render page after all promises from loaded resources is resolved.

Kind: instance method of ServerPageRenderer

Param Type
controller AbstractController
view React.Component
pageState Object.<string, \*>
routeOptions Object.<string, \*>

serverPageRenderer._renderPageContentToString(controller, view, routeOptions) ⇒ string 

Render page content to a string containing HTML markup.

Kind: instance method of ServerPageRenderer

Param Type
controller AbstractController
view function
routeOptions Object.<string, \*>

ima~mount() 

Kind: inner abstract method of ima


ima~update() 

Kind: inner method of ima


ima~unmount() 

Kind: inner method of ima