SAP NetWeaver '04

com.sapportals.wcm.rendering.uicommand
Class UICommandRenderer

[contained in: com.sap.km.cm.ui.flex.par - km.shared.ui.flex.uicommand_api.jar]
com.sapportals.wcm.rendering.uicommand.UICommandRenderer

public final class UICommandRenderer

This class can be used to take care of the complete rendering of a resource. The class uses the LayoutObject, set in the constructor to retrieve all parametrization from the calling class. It then returns a Component that is ready-to-use.


Constructor Summary
UICommandRenderer(ILayoutObject layoutObject, IProxy proxy)
          Sets the two member variables of the renderer with the values of the given parameters.
UICommandRenderer(com.sapportals.wcm.repository.service.layout.customizing.IParameters parameters, IProxy proxy)
           
UICommandRenderer(LayoutObject layoutObject, IProxy proxy)
          Sets the two member variables of the renderer with the values of the given parameters.
 
Method Summary
static com.sapportals.htmlb.Component getCommandIconComponent(IUIBaseCommand command, IResource resource)
           
 com.sapportals.htmlb.Component renderAction(IResource res, com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
          renders the IUIGroupCommand defined for the given resource.
 com.sapportals.htmlb.Component renderAsIcon(IResource res, com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
          renders the IUIGroupCommand defined for the given resource as a hover menu, opening from an icon.
 com.sapportals.htmlb.Component renderAsLink(IResource res, com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
          renders the IUIGroupCommand defined for the given resource as a list of links.
 com.sapportals.htmlb.Component renderCollectionAction(IResource res, com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
          renders the IUIGroupCommand defined for the given resource.
 com.sapportals.htmlb.Component renderCommandContentLink(IResource resource, java.lang.String commandAlias, com.sapportals.htmlb.Component comp)
          Renders the command contentLink modifier for a given command alias and a given comp If commandAlias is null or the resource is null then it returns the given Component
 com.sapportals.htmlb.Component renderMassAction(IResource res, com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
          renders the IUIGroupCommand defined for the given resource.
 

Constructor Detail

UICommandRenderer

public UICommandRenderer(com.sapportals.wcm.repository.service.layout.customizing.IParameters parameters,
                         IProxy proxy)

UICommandRenderer

public UICommandRenderer(LayoutObject layoutObject,
                         IProxy proxy)
Sets the two member variables of the renderer with the values of the given parameters.
Parameters:
layoutObject - a layoutObject that holds all the parametrization to create the correct rendering. Must not be null.
proxy - the proxy that is used as the target control, when the commands that are included in the returned Component trigger Events.

UICommandRenderer

public UICommandRenderer(ILayoutObject layoutObject,
                         IProxy proxy)
Sets the two member variables of the renderer with the values of the given parameters.
Parameters:
layoutObject - a layoutObject that holds all the parametrization to create the correct rendering. Must not be null.
proxy - the proxy that is used as the target control, when the commands that are included in the returned Component trigger Events.
Method Detail

renderMassAction

public com.sapportals.htmlb.Component renderMassAction(IResource res,
                                                       com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
                                                throws WcmException
renders the IUIGroupCommand defined for the given resource.
Parameters:
res - the resource IUIGroupCommand is needed for.
parameterName - the parameterName that specifies, which parameter holds the information which groupcommand to render
Returns:
a Component that holds the defined IUIGroupCommand and its children as Components. This method checks first, if the parameter with key IResourceRendererParameterNameConst.COLLECTION_ACTIONSTYLE is set. If it is not set, the default IParameterNameConst.ACTIONSTYLE_HOVER is used. If that parameter holds an invalid value, an empty TextView is returned.
Throws:
WcmException - Description of the Exception

renderCollectionAction

public com.sapportals.htmlb.Component renderCollectionAction(IResource res,
                                                             com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
                                                      throws WcmException
renders the IUIGroupCommand defined for the given resource.
Parameters:
res - the resource IUIGroupCommand is needed for.
parameterName - the parameterName that specifies, which parameter holds the information which groupcommand to render
Returns:
a Component that holds the defined IUIGroupCommand and its children as Components. This method checks first, if the parameter with key IResourceRendererParameterNameConst.COLLECTION_ACTIONSTYLE is set. If it is not set, the default IParameterNameConst.ACTIONSTYLE_HOVER is used. If that parameter holds an invalid value, an empty TextView is returned.
Throws:
WcmException - Description of the Exception

renderAction

public com.sapportals.htmlb.Component renderAction(IResource res,
                                                   com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
                                            throws WcmException
renders the IUIGroupCommand defined for the given resource.
Parameters:
res - the resource IUIGroupCommand is needed for.
parameterName - the parameterName that specifies, which parameter holds the information which groupcommand to render
Returns:
a Component that holds the defined IUIGroupCommand and its children as Components. This method checks first, if the parameter with key IResourceRendererParameterNameConst.ITEMACTIONSTYLE is set. If not, the key ICollectionRendererParameterNameConst.COLLECTION_ACTIONSTYLE is read out. If it is not set either, the default IParameterNameConst.ACTIONSTYLE_HOVER is used. If that parameter holds an invalid value, an empty TextView is returned.
Throws:
WcmException - Description of the Exception

renderAsLink

public com.sapportals.htmlb.Component renderAsLink(IResource res,
                                                   com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
                                            throws WcmException
renders the IUIGroupCommand defined for the given resource as a list of links.
Parameters:
res - the resource IUIGroupCommand is needed for.
parameterName - the parameterName that specifies, which parameter holds the information which groupcommand to render
Returns:
a Component that holds the defined IUIGroupCommand and its children as Components. If the configuration is invalid, an empty TextView /code> is returned
Throws:
WcmException - Description of the Exception

renderAsIcon

public com.sapportals.htmlb.Component renderAsIcon(IResource res,
                                                   com.sapportals.wcm.repository.service.layout.customizing.IParameterName parameterName)
                                            throws WcmException
renders the IUIGroupCommand defined for the given resource as a hover menu, opening from an icon.
Parameters:
res - the resource IUIGroupCommand is needed for.
parameterName - the parameterName that specifies, which parameter holds the information which groupcommand to render
Returns:
a Component that holds the defined IUIGroupCommand and its children as Components. If the configuration is invalid, an empty TextView /code> is returned
Throws:
WcmException - Description of the Exception

renderCommandContentLink

public com.sapportals.htmlb.Component renderCommandContentLink(IResource resource,
                                                               java.lang.String commandAlias,
                                                               com.sapportals.htmlb.Component comp)
Renders the command contentLink modifier for a given command alias and a given comp If commandAlias is null or the resource is null then it returns the given Component

getCommandIconComponent

public static final com.sapportals.htmlb.Component getCommandIconComponent(IUIBaseCommand command,
                                                                           IResource resource)

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.