SAP NetWeaver '04

com.sapportals.wcm.service.propertyconfig.renderer
Interface IStructuredPropertyRenderer

[contained in: com.sap.km.cm.service.base.par - km.shared.service.propertyconfig_api.jar]
public interface IStructuredPropertyRenderer


Method Summary
 IPropertyMap getProperties(IMetaName metaName, IMetaContext rendererContext, com.sapportals.htmlb.page.DynPage dynPage)
          Gets the properties with their entered values after the response has been returned.
 java.lang.String[] processEvent(IMetaName metaName, com.sapportals.htmlb.event.Event event, IMetaContext rendererContext, com.sapportals.htmlb.page.DynPage dynPage)
          The property renderer can react to events.
 com.sapportals.htmlb.Component renderMetaNameLabel(IMetaName metaName, IMetaContext rendererContext)
          Renders a htmlb Component for the label for a given IMetaName and a given IMetaContext null as returned component is accepted, if no label is whished.
 com.sapportals.htmlb.Component renderMetaProperty(IMetaName metaName, IMetaContext rendererContext)
          Renders a htmlb Component for a given IMetaName and a given IMetaContext null as returned component is accepted, if the renderer context does not allowed that the IMetaName to be rendered (The permission should be check).
 

Method Detail

renderMetaProperty

public com.sapportals.htmlb.Component renderMetaProperty(IMetaName metaName,
                                                         IMetaContext rendererContext)
                                                  throws WcmException
Renders a htmlb Component for a given IMetaName and a given IMetaContext null as returned component is accepted, if the renderer context does not allowed that the IMetaName to be rendered (The permission should be check). The returned Component can be different according with PropertyDisplyMode from IMetaContext. From IMetaContext can be taken the current value of the property, the IResourceConext, the current IResource, the IPropertyRendererProxy which generates unique Ids for Components and the invalid metaNames as a Hashmap. As key in the Hashmap is IMetaName.getId(). If the IMetaName has an input into invalid Hashmap than the Component will be rendered as invalid. For setting a unique rendering id for the component it should be used rendererContext.getRendererProxy().getUniqueComponentId(IMetaName metaName, String key) If in the rendering Components there are components which need a server round trip (ex Buttons ) then as unique Id should be call rendererContext.getRendererProxy().dispatchableControlIDWithValues(ArrayList values) or rendererContext.getRendererProxy().dispatchableControlID(String action). In ArrayList the first value should be the action of the button. Normally this string will be encode into a htmlb Event and it will be sent for processing in processEvent method
Parameters:
metaName - the given IMetaName for which the component will be rendered
rendererContext - the given IMetaContext for which the component will be rendered
Returns:
a htmlb Component which will rendered in in UI dialog
Throws:
WcmException -  

processEvent

public java.lang.String[] processEvent(IMetaName metaName,
                                       com.sapportals.htmlb.event.Event event,
                                       IMetaContext rendererContext,
                                       com.sapportals.htmlb.page.DynPage dynPage)
                                throws WcmException
The property renderer can react to events. If this is not whished then this mehode can return null. The Event should be decode using rendererContext.getRendererProxy().decodeValues(event); If the ArrayList is not empty then the first value from it is the action as String. If the action is known by the renderer then the logic should be implemented If something fails then one or more error messages should be returns as String array
Parameters:
rendererContext - context information for the renderer
dynPage - htmlb dynpage that contains the response document
metaName - the given IMetaName for which the renderer is called
event - the Event which has encoded the action and other value which will be process by the renderer
Returns:
localized error messages or null
Throws:
PropertyStructureServiceException - Description of the Exception

getProperties

public IPropertyMap getProperties(IMetaName metaName,
                                  IMetaContext rendererContext,
                                  com.sapportals.htmlb.page.DynPage dynPage)
                           throws WcmException
Gets the properties with their entered values after the response has been returned. The method will be call by every summit event and it should read the generated htmlb Component from the DynPage, the the input value, and validate and create a IProperty for this IMetaName. If the input value is invalid then it will created a IProperty with empty value like it follows :
Properties errorProperties = new Properties(); errorProperties.setProperty(metaName.getId(), value); currentProperty = new Property(new PropertyName(metaName.getNamespace(), metaName.getName()), "", errorProperties); This IProperty will be added into a IPropertyMap and it will be shown as invalid input. The returned IPropertyMap could have one or more IProperty according with the property renderer logic.
Parameters:
dynPage - htmlb dynpage that contains the response document
metaName - the given IMetaName for which the property will be created
rendererContext - - contains the rendering information: which IResourceContext, IResource or PropertyDisplayMode
Returns:
map of properties. null is accepted
Throws:
PropertyStructureServiceException -  

renderMetaNameLabel

public com.sapportals.htmlb.Component renderMetaNameLabel(IMetaName metaName,
                                                          IMetaContext rendererContext)
Renders a htmlb Component for the label for a given IMetaName and a given IMetaContext null as returned component is accepted, if no label is whished.
Parameters:
metaName - the given IMetaName for which the component will be rendered
rendererContext - the given IMetaContext for which the component will be rendered
Returns:
a htmlb Component which will rendered in in UI dialog
Throws:
WcmException -  

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.