SAP NetWeaver '04

Package com.sapportals.wcm.rendering.layout

Represents a container for defining the layout of explorer controls.

See:
          Description

Interface Summary
IExtLayoutController  
ILayoutComponent  
ILayoutComposer  
ILayoutController Acts as a thin layer to allow a flexible arrangement of Control instances.
IPreviewLayout This is a tag-interface, telling if the implementing class offers a Control or some other means to show a preview of the content of an IResource
 

Class Summary
AbstractLayoutComposer  
AbstractLayoutController Abstract class to implement some convenience methods for new implementations of the ILayoutController.
LayoutControllerFactory  
 

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.

 


SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.