Skip navigation links
SAP NetWeaver 7.50 SP 13 KMC

Package com.sapportals.wcm.rendering.layout

Represents a container for defining the layout of explorer controls.

See: Description

Package com.sapportals.wcm.rendering.layout Description

Represents a container for defining the layout of explorer controls.

Package Specification

Purpose
Detailed Concept
Interfaces and Classes
Configuration
Implementation Notes

Purpose

The layout package is one of several packages in the KM framework that enable flexible rendering of explorer controls. Its task is to provide a container that is used to define the contents of a screen that enables users to explore the items in a repository. It defines the:

Detailed Concept

The ILayoutController defines the number of controls that are rendered on the explorer screen at runtime, their position and their flavor. An explorer screen can be comprised of several inner controls and each of these can, in turn, have a flavor that determines their appearance. The flavor defines the arrangement of the resources. Flavors can be predefined as specified in the IFlavorConst class or can be defined individually to meet the requirements of a special audience. Currently predefined flavors are for example, list, tree, table, grid, breadcrumb. If new flavors are defined, corresponding renderer settings (both for collections and resources) must be defined in the configuration, so they can be retrieved for the controls with these new flavors.
A LayoutController can add its own htmlb-Components to the rendered output, for example, to add static texts, links or external pages.

Instead of using Controls, the ILayoutController can also use ICollectionRenderer instances directly. To take advantage of that approach, the abstract class AbtractLayoutComposer should be extended.

The available flavors are defined in the class IFlavorConst class of the layout repository service (com.sapportals.wcm.repository.service.layout.customizing)

Interfaces and Classes

ILayoutController is the central interface of the layout package. Different implementations of this interface store the information for different layouts of an explorer screen. To create and keep track of the different ILayoutControllers, the package provides an LayoutControllerFactory. This is responsible for supplying the correct ILayoutController whenever one is required. For example, if a folder with resources is to be displayed, the factory finds out whether an ILayoutController is assigned to this folder. If so, it returns an instance of the correct ILayoutController, if not, it supplies a default controller.

The layout package provides an AbstractLayoutComposer class to give guidance for the implementation of a new ILayoutController that meets special requirements. Although a number of predefined and implemented ILayoutControllers are available, it may nevertheless be desirable to design the layout of the collectionrenderers and additional htmlb-objects in a new implementation. For information on already implemented layout controllers see the Implementation Notes below.

Configuration

Layout Controllers can be configured at two locations in the configuration framework. They are referenced in the LayoutSets under Content Management->UserInterface->Settings and they are defind in the LayoutController under Content Management->UserInterface->Mapping->LayoutController.

The following attributes are available:  

Property Required Description
renderingclass Yes Class that implements the ILayoutController interface
description No Short description of the controls and flavors used within this layout controller
alias Yes Unique name to identify the ILayoutControllerto use. Within the configuration, only the alias is used, never the original Java name of the class.

  Implementation Notes

The ILayoutController object and ILayoutControllerFactory work in close coordination with other elements of the KM framework related to rendering. When, for example, a particular folder and its resource have to be rendered with an ILayoutController, the process is as follows:

An AbstractProxyControl instance is informed via an event that a folder must be rendered. It requests an ILayoutController object from the LayoutControllerFactory to find out how the folder must be rendered on the screen. The factory, in turn, has to find out which ILayoutController is required for the folder in question. It gets this information from the ICustomizingController that stores all customizing information for folders in the form of parameters. If an ILayoutController is specified for the folder, the factory instantiates it and passes it on to the AbstractProxyControl instance. The proxy then calls the layout controllers's render method. Within the render method, the layout controller can use several collectionrenderers to render the folder and its children. The layoutcontroller must use the ICollectionRendererFactory to retrieve ICollectionRenderer instances to further delegate rendering tasks.

 

Skip navigation links
SAP NetWeaver 7.50 SP 13 KMC

Copyright 2018 SAP AG Complete Copyright Notice