Class: PageRendererFactory

PageRendererFactory

Factory for page render.


new PageRendererFactory(oc, React)

Initializes the factory used by the page renderer.

Parameters:
Name Type Description
oc ObjectContainer

The application's dependency injector - the object container.

React React

The React framework instance to use to render the page.

Members


_oc :ObjectContainer

The application's dependency injector - the object container.

Type:

<protected> _React :React

Rect framework instance, used to render the page.

Type:
  • React

Methods


_resolveClassConstructor(view)

Returns the class constructor of the specified view component. View may be specified as a namespace path or as a class constructor.

Parameters:
Name Type Description
view function

The namespace path pointing to the view component, or the constructor of the React.Component.

Returns:

The constructor of the view component.

Type
function

createReactElementFactory(view)

Return a function that produces ReactElements of a given type. Like React.createElement.

Parameters:
Name Type Description
view string | function

The react component for which a factory function should be created.

Returns:

The created factory function. The factory accepts an object containing the component's properties as the argument and returns a rendered component.

Type
function

getDocumentView(documentView)

Returns the class constructor of the specified document view component. Document view may be specified as a namespace path or as a class constructor.

Parameters:
Name Type Description
documentView function | string

The namespace path pointing to the document view component, or the constructor of the document view component.

Returns:

The constructor of the document view component.

Type
function

getManagedRootView(managedRootView)

Returns the class constructor of the specified managed root view component. Managed root view may be specified as a namespace path or as a class constructor.

Parameters:
Name Type Description
managedRootView function | string

The namespace path pointing to the managed root view component, or the constructor of the React component.

Returns:

The constructor of the managed root view component.

Type
function

getUtils()

Return object of services which are defined for alias $Utils.


wrapView(view, props)

Wraps the provided view into the view adapter so it can access the state passed from controller through the props property instead of the state property.

Parameters:
Name Type Description
view function | string

The namespace path pointing to the view component, or the constructor of the React.Component.

props Object

The initial props to pass to the view.

Returns:

View adapter handling passing the controller's state to an instance of the specified page view through properties.

Type
React.Element