SAP NetWeaver '04

Package com.sapportals.wcm.rendering.collection

Contains interfaces for flexible rendering of collections or lists of resources.

See:
          Description

Interface Summary
ICollectionRenderer The implementing class renders the given ICollection or TypedResourceList.
IComponent  
IComponentEvent  
IConfigurableComponent  
 

Class Summary
AbstractCollectionRenderer This abstract class can be used when implementing new CollectionRenderer-Classes It provides persistence of selections (when mass actions are enabled), takes care of ResourceProperties, offers method to create sorting box in Control Persistence is realized by using IUMPrincipal.setTransientAttribute .
AbstractCollectionRenderer.Persistence  
AbstractComponent  
AbstractRendererStatus  
CollectionRendererDecorator  
CollectionRendererFactory This class is a singleton factory, creating new instances of ICollectionRenderer.
CollectionRendererStatus  
CollectionRendererUtil  
ComponentFactory  
ComponentValueMap  
DefaultResourcePropertyComparator since EP5, SP6 and EP6, SP1
EmbeddedEvent  
EventData  
LightCollectionRenderer  
PagerEvent  
SearchRendererStatus The SearchRendererStatus class renders a search resultinput.
SelectionHandler This class acts as a decorator for an ILightCollectionRenderer and takes care of the rendering and evaluation of selection-boxes for displayed resources.
SortEvent  
SortHandler  
 

Package com.sapportals.wcm.rendering.collection Description

Contains interfaces for flexible rendering of collections or lists of resources.

Package Specification

Purpose
Detailed Concept
Interfaces and Classes
Configuration
Implementation Notes

Purpose

The collection renderer package is one of several packages in the KM framework that enable flexible rendering of explorer controls. Its task is to render a folder and its children or a list of resources and to allow the selection of these resources. For the execution of this task, it may delegate some of its responsibiliteis to classes from the packages uicommand and resourcerenderer. Instances of ICollectionRenderer are provided by the CollectionRendererFactory . An ICollectionRenderer can, for example, display a list of resources as a table, list, grid or as an image with clickable sections.

Detailed Concept

LayoutController can delegate the task of rendering lists of resources to an ICollectionRenderer. As the selection of an ICollectionRenderer  is dynamic and not defined at compilation time, it enables a more flexible user interface. A layoutcontroller can decide to render nothing by itself and to let the rendering classes perform the task. With this approach, the user interface can be created by choosing an ILayoutController   that, in turn, uses these collection renderer classes to perform the rendering. In this way, a different UIs can be created, using only the configuration. No new code is required to meet special requirements.

The package also enables the selection of resources for a mass command. In a standard use-case, an AbstractProxyControl is used as the command-executing instance. When it executes the command, it finds out all classes that implement the IResourceListProvider  interface and returns their list of selected resources.

Interfaces and Classes

The ICollectionRenderer defines the layout of the list of resources it renders. The list may be retrieved from the parent collection or provided by other framework components (like a search result list). The core responsibility of the renderer is to filter the given list of resources, sort them and display them to the user. However, implementations of the ICollectionRenderer can decide to focus on rendering only.

The ICollectionRenderer extends the ILayoutObject interface. The methods getSupportedParameters()and setParameters() play a central role in the configuration of the renderer. The behavior of most collection renderers can be customized. (for example, to control the number of columns displayed in a grid-layout) .With the get method, the renderer publishes the customizing parameters that it understands. With the set method, it receives values for these parameters.

The CollectionRendererFactory  is the central and only entry point for obtaining valid and ready-to-use instances of ICollectionRenderer. It is responsible for checking the current configuration and returning the fitting class or, if none is defined , the default class. The instance returned by the factory is already fully configured. 

The IResourceListProvider interface enables the selection of resources. Classes that implement the interface can return a list of resources that can be used for mass commands. The outermost container control , AbstractProxyControl , can decide to use the interface's resetSelection method to clear all selections if the user navigates to a different folder. 

Configuration

Collection renderes can be configured at two locations in the ConfigurationFramework. They are referenced in the CollectionRendererSettings under Content Management->UserInterface->Settings->CollectionRendererSettings and they are defined under Content Management->UserInterface->Mapping->CollectionRenderer

The following attributes are available:

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

A table with collection renderer settings is not provided because in the configuration framework plugin for collection renderer settings, different configuration classes are defined with different attributes. Details can be found in the documentation of the configuration.

Implementation Notes

The ICollectionRenderer object and CollectionRendererFactory 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 ICollectionRenderer, the process is as follows:

An AbstractProxyControl instance is informed via an event that a folder must be rendered. In response, the proxy requests an ILayoutController object from the LayoutControllerFactory. It then calls the layout controllers's render method. It can use the ICollectionRendererFactory to retrieve ICollectionRenderer instances. The ICollectionRenderer uses IResourceRenderers, that are provided by the ResourceRendererFactory, to further delegate rendering. It also uses ICommands, provided by the UICommandFactory, to delegate the creation of commands for the displayed resources.


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.