com.sapportals.wcm.control.base

Class WcmBaseControl

java.lang.Object
  extended by com.sapportals.wdf.stack.Control
      extended by com.sapportals.wcm.control.base.WcmBaseControl
Direct Known Subclasses:
AbstractCollectionRenderer, AbstractProxyControl, ClassLoadingTracerControl, ConfirmControl, ConvertToBase64Control, EmptyControl, NavigationControl, PageControl, ResourcePathControl2, StatusInfoAndCloseControl, StatusInfoControl, TextInfoControl, WcmResourceControl

Deprecated. As of NetWeaver 7.1

public abstract class WcmBaseControl
extends com.sapportals.wdf.stack.Control

Base Class to create reusable controls with WCM. All internally handled actions should be .setOnClick(ControlEventDispatcher.DISPATCH_EVENT);
The control IDs have to be generated using: ControlEventDispatcher.dispatchableControlID()
Classes deriving from this class need to implement a default constructor in order to be dynamically Instantiated for events.


Field Summary
static String BLANK_LINK_TARGET
          Deprecated. constant for links that open a new browser window
static int CELL_PADDING_STANDARD
          Deprecated. constants to ensure consisting layout over all WCM-Controls, should be used instead of setting own Spacing, Padding etc. in inherited controls
static int CELL_SPACING_STANDARD
          Deprecated.  
static com.sapportals.htmlb.enums.TextViewDesign CONTROL_HEADER_STANDARD
          Deprecated.  
protected  String DETAILS_CONFIG_FILE
          Deprecated.  
static String NONE
          Deprecated. Constants used by controls that show an explanation text.
protected static String RES_BUTTON_ADD
          Deprecated.  
protected static String RES_BUTTON_APPLY
          Deprecated.  
protected static String RES_BUTTON_BACK
          Deprecated.  
protected static String RES_BUTTON_CANCEL
          Deprecated.  
protected static String RES_BUTTON_CLOSE
          Deprecated.  
protected static String RES_BUTTON_LOAD
          Deprecated.  
protected static String RES_BUTTON_MORE
          Deprecated.  
protected static String RES_BUTTON_OK
          Deprecated. flag to check, if 508rendering (for handicapped people) is needed or not
protected static String RES_BUTTON_REMOVE
          Deprecated.  
protected static String RES_BUTTON_SAVE
          Deprecated.  
protected static String RES_BUTTON_SELECT
          Deprecated.  
protected static String RES_BUTTON_UPDATE
          Deprecated.  
protected  IResourceContext resourceContext
          Deprecated. Current resource context which is initially set by a pagelet and is restored by the dispatch framework.
static String SUMMARY
          Deprecated.  
 
Fields inherited from class com.sapportals.wdf.stack.Control
id
 
Constructor Summary
WcmBaseControl()
          Deprecated.  
 
Method Summary
 String getBaseBundleString(String baseName, String key)
          Deprecated. As of NetWeaver 7.1
 String getBaseBundleString(String baseName, String key, Object obj)
          Deprecated. As of NetWeaver 7.1
protected  String getBaseBundleString(String baseName, String key, Object[] objs)
          Deprecated. As of NetWeaver 7.1
 String getBaseBundleString(String baseName, String key, Object obj1, Object obj2)
          Deprecated. As of NetWeaver 7.1
protected  String getBundleString(String key)
          Deprecated. As of NetWeaver 7.1
protected  String getBundleString(String key, Object obj)
          Deprecated. As of NetWeaver 7.1
protected  String getBundleString(String key, Object[] objs)
          Deprecated. As of NetWeaver 7.1
protected  String getBundleString(String key, Object obj1, Object obj2)
          Deprecated. As of NetWeaver 7.1
protected  com.sapportals.htmlb.Component getBusinessCardLink(String userId, String linkName, String displayName, String targetName)
          Deprecated. As of NetWeaver 7.1
protected  com.sapportals.htmlb.Image getImage(String fileName, String alternateText, String tooltip)
          Deprecated. As of NetWeaver 7.1
 com.sapportals.wdf.ParameterConfiguration getParameterConfiguration()
          Deprecated. As of NetWeaver 7.1
 IResourceContext getResourceContext()
          Deprecated. As of NetWeaver 7.1
protected  IUriReference getServicePageUri(String uri, String startPage)
          Deprecated. As of NetWeaver 7.1
protected  void handleException(Exception e)
          Deprecated. As of NetWeaver 7.1
 boolean isSection508Rendering()
          Deprecated. As of NetWeaver 7.1
 boolean isTestMode()
          Deprecated. As of NetWeaver 7.1
 boolean isVisible()
          Deprecated. As of NetWeaver 7.1
protected  void readInputData()
          Deprecated. As of NetWeaver 7.1
 void setControlContext(com.sapportals.wdf.stack.ControlContext controlContext)
          Deprecated. As of NetWeaver 7.1
 void setResourceContext(IResourceContext resourceContext)
          Deprecated. As of NetWeaver 7.1
 void setTestMode(boolean testMode)
          Deprecated. As of NetWeaver 7.1
 void setVisible(boolean visible)
          Deprecated. As of NetWeaver 7.1
 
Methods inherited from class com.sapportals.wdf.stack.Control
create, create, createNestedControls, createUnequivocallyComponentId, dispatchHtmlbEvent, dispatchWdfEvent, getControlContext, getDynPage, getID, getParent, getPersistenceComponentManager, getRootControl, getStackId, initialize, initializeImpl, isInitialized, register, render, renderPersistentProperties, resetNestedControls, restorePersistentProperties, restoreProperties, setID, setInitialized, setParent, setStackId, triggerInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DETAILS_CONFIG_FILE

protected final String DETAILS_CONFIG_FILE
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_OK

protected static final String RES_BUTTON_OK
Deprecated. 
flag to check, if 508rendering (for handicapped people) is needed or not

See Also:
Constant Field Values

RES_BUTTON_CANCEL

protected static final String RES_BUTTON_CANCEL
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_BACK

protected static final String RES_BUTTON_BACK
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_APPLY

protected static final String RES_BUTTON_APPLY
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_REMOVE

protected static final String RES_BUTTON_REMOVE
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_ADD

protected static final String RES_BUTTON_ADD
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_SAVE

protected static final String RES_BUTTON_SAVE
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_LOAD

protected static final String RES_BUTTON_LOAD
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_SELECT

protected static final String RES_BUTTON_SELECT
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_UPDATE

protected static final String RES_BUTTON_UPDATE
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_MORE

protected static final String RES_BUTTON_MORE
Deprecated. 
See Also:
Constant Field Values

RES_BUTTON_CLOSE

protected static final String RES_BUTTON_CLOSE
Deprecated. 
See Also:
Constant Field Values

CELL_PADDING_STANDARD

public static final int CELL_PADDING_STANDARD
Deprecated. 
constants to ensure consisting layout over all WCM-Controls, should be used instead of setting own Spacing, Padding etc. in inherited controls

See Also:
Constant Field Values

CELL_SPACING_STANDARD

public static final int CELL_SPACING_STANDARD
Deprecated. 
See Also:
Constant Field Values

CONTROL_HEADER_STANDARD

public static final com.sapportals.htmlb.enums.TextViewDesign CONTROL_HEADER_STANDARD
Deprecated. 

BLANK_LINK_TARGET

public static final String BLANK_LINK_TARGET
Deprecated. 
constant for links that open a new browser window

See Also:
Constant Field Values

NONE

public static final String NONE
Deprecated. 
Constants used by controls that show an explanation text. Via iView-Parameter, the user can switch to a different mode for these texts:
"none" - no text will be displayed
"summary" - a rather short summary on how to use the shown control is displayed

See Also:
Constant Field Values

SUMMARY

public static final String SUMMARY
Deprecated. 
See Also:
Constant Field Values

resourceContext

protected IResourceContext resourceContext
Deprecated. 
Current resource context which is initially set by a pagelet and is restored by the dispatch framework.

Constructor Detail

WcmBaseControl

public WcmBaseControl()
Deprecated. 
Method Detail

setResourceContext

public void setResourceContext(IResourceContext resourceContext)
Deprecated. As of NetWeaver 7.1


getResourceContext

public IResourceContext getResourceContext()
Deprecated. As of NetWeaver 7.1


setControlContext

public void setControlContext(com.sapportals.wdf.stack.ControlContext controlContext)
Deprecated. As of NetWeaver 7.1

ControlContext is setting resourceContext automatically. *

Overrides:
setControlContext in class com.sapportals.wdf.stack.Control

getBaseBundleString

protected String getBaseBundleString(String baseName,
                                     String key,
                                     Object[] objs)
                              throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle. The defaultBundle must exist for the base class, the one for the derived class is optional. The method tries to find a key in the optional bundle. If the key is not found the default bundle is used (=> optional bundle can overwrite keys from the default bundle). If no key is found a exception is thrown.

Parameters:
baseName - base name of property file (null: current class name)
key - A resource bundle key that must exist in either the optional or default bundle.
objs - An object array containing objects to be replaced in the bundle (@see java.text.MessageFormat)
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBundleString

protected String getBundleString(String key,
                                 Object[] objs)
                          throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle. The defaultBundle must exist for the base class, the one for the derived class is optional. The method tries to find a key in the optional bundle. If the key is not found the default bundle is used (=> optional bundle can overwrite keys from the default bundle). If no key is found a exception is thrown.

Parameters:
key - A resource bundle key that must exist in either the optional or default bundle.
objs - An object array containing objects to be replaced in the bundle (@see java.text.MessageFormat)
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBaseBundleString

public String getBaseBundleString(String baseName,
                                  String key)
                           throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Convenience routine without replacement objects

Parameters:
baseName - base name of property file (null: current class name)
key - A resource bundle key that must exist in either the optional or default bundle.
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.
See Also:
getBaseBundleString(String baseName, String key, Object[] objs)

getBundleString

protected String getBundleString(String key)
                          throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Convenience routine without replacement objects

Parameters:
key - A resource bundle key that must exist in either the optional or default bundle.
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.
See Also:
getBaseBundleString(String baseName, String key, Object[] objs)

getBaseBundleString

public String getBaseBundleString(String baseName,
                                  String key,
                                  Object obj)
                           throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle (@see getBundleString(String baseName, String key, Object[] objs)). Additionally, each occurrence of place holder {0} will be replaced by the given text parameter.

Parameters:
baseName - base name of property file (null: current class name)
key - A resource bundle key that must exist in either the optional or default bundle.
obj - An object that will be replaced at each occurrence of "{1 [, ]}".
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBundleString

protected String getBundleString(String key,
                                 Object obj)
                          throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle (@see getBundleString(String baseName, String key, Object[] objs)). Additionally, each occurrence of place holder {0} will be replaced by the given text parameter.

Parameters:
key - A resource bundle key that must exist in either the optional or default bundle.
obj - An object that will be replaced at each occurrence of "{1 [, ]}".
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBaseBundleString

public String getBaseBundleString(String baseName,
                                  String key,
                                  Object obj1,
                                  Object obj2)
                           throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle (@see getBundleString(String baseName, String key, Object[] objs)). Additionally, each occurrence of place holder {n-1} will be replaced by the corresponding text parameter.

Parameters:
baseName - base name of property file (null: current class name)
key - A resource bundle key that must exist in either the optional or default bundle.
obj1 - An object that will be replaced at each occurrence of "{1 [, ]}".
obj2 - An object that will be replaced at each occurrence of "{2 [, ]}".
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBundleString

protected String getBundleString(String key,
                                 Object obj1,
                                 Object obj2)
                          throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle (@see getBundleString(String baseName, String key, Object[] objs)). Additionally, each occurrence of place holder {n-1} will be replaced by the corresponding text parameter.

Parameters:
key - A resource bundle key that must exist in either the optional or default bundle.
obj1 - An object that will be replaced at each occurrence of "{1 [, ]}".
obj2 - An object that will be replaced at each occurrence of "{2 [, ]}".
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

setVisible

public void setVisible(boolean visible)
Deprecated. As of NetWeaver 7.1


isVisible

public boolean isVisible()
Deprecated. As of NetWeaver 7.1


isSection508Rendering

public boolean isSection508Rendering()
Deprecated. As of NetWeaver 7.1


setTestMode

public void setTestMode(boolean testMode)
Deprecated. As of NetWeaver 7.1


isTestMode

public boolean isTestMode()
Deprecated. As of NetWeaver 7.1


handleException

protected void handleException(Exception e)
                        throws com.sapportals.wdf.WdfException
Deprecated. As of NetWeaver 7.1

Throws:
com.sapportals.wdf.WdfException

readInputData

protected void readInputData()
                      throws com.sapportals.wdf.WdfException
Deprecated. As of NetWeaver 7.1

Overrides:
readInputData in class com.sapportals.wdf.stack.Control
Throws:
com.sapportals.wdf.WdfException

getImage

protected com.sapportals.htmlb.Image getImage(String fileName,
                                              String alternateText,
                                              String tooltip)
                                       throws WcmException
Deprecated. As of NetWeaver 7.1

Gets the specified image.

Parameters:
fileName - the name of the imagefile (wihout path)
alternateText - an alternative text to display when image not available
tooltip - the string used for displaying in the tooltip
Returns:
an Image object
Throws:
WcmException - if URL generator could not be retrieved

getBusinessCardLink

protected com.sapportals.htmlb.Component getBusinessCardLink(String userId,
                                                             String linkName,
                                                             String displayName,
                                                             String targetName)
                                                      throws WcmException
Deprecated. As of NetWeaver 7.1

Gets a HTMLB Link referring to the business card of the specified user. If the business card could not be retrieved, a TextView component showing displayName will be returned instead.

Parameters:
userId - the identifier of the user in question
linkName - the internal name of the Link object to be created
displayName - the name used for displaying the Link object
targetName - the target used for the Link object (not used anymore, the link will always create a new window)
Returns:
a HTMLB Link object pointing to the user's business card or a TextView object if business card not available
Throws:
WcmException - if URL generator could not be retrieved

getServicePageUri

protected IUriReference getServicePageUri(String uri,
                                          String startPage)
                                   throws com.sapportals.wdf.WdfException
Deprecated. As of NetWeaver 7.1

Gets the relative URI to the service page for bringing up the specified page startPage handling the specified resource at uri.

Parameters:
uri - the RID of the resource in question
startPage - the page to be started
Returns:
the relative URI reference to the service page
Throws:
com.sapportals.wdf.WdfException - on error
See Also:
IURLGeneratorService.getServicePageUri(java.util.List)

getParameterConfiguration

public com.sapportals.wdf.ParameterConfiguration getParameterConfiguration()
                                                                    throws com.sapportals.wdf.WdfException
Deprecated. As of NetWeaver 7.1

Throws:
com.sapportals.wdf.WdfException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-CM [sap.com] tc/km/nonwduideprecated api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice