Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Class Description: This class is responsible for constructing the widget container, i.e the container of all the Apps in a sub workspace and also instantiates the widgets as per meta data.

...

Meta data to be considered: ct.metadata.getAppsByLayoutId(workspaceId,layoutId) → Gives the Portlet information of individual apps that have been configured against the sub workspace.
ct.workspace.metadata.getUpdatedLayoutDef(layoutId).LAYOUT_LAYOUT → The Configured Layout type of the sub workspace. Sub workspaces today support the following layouts:

...



What developers are expected to do: Developers are expected to render the Container based on the meta data and should also instantiate the Widget class by passing this class. This is important as widgets involve asynchronous processing and hence the Canvas core finally looks to append the widget object to the widget container element.

APIs to be supported:

API

Purpose

Arguments

appendChild

To append the portlet to the widget container element. The core layer instantiates the portlet after fetching the meta data and calls this API for the component to append it in the appropriate container i.e. left/right/center.

Object with the following key value pairs
{
    CHILD: The actual child portlet element
    POSITION: The numbered                                          position, e.g. 1 or 2
    BLOCK_POSITION: "LEFT" or "RIGHT"
}


Registry Signature:         


Code Block
languagejs
CLCR.registerCmp({'COMP_TYPE':'WIDGET_CONTAINER'}, <<Widget container class>>);

Scope: Other than what the developers pass through layout container, the layout manager also passes its own reference.

...