com.sapportals.wcm.control.edit

Class DemoPropertiesControl

java.lang.Object
  extended by com.sapportals.wdf.stack.Control
      extended by com.sapportals.wcm.control.base.WcmBaseControl
          extended by com.sapportals.wcm.control.base.WcmResourceControl
              extended by com.sapportals.wcm.control.edit.DemoPropertiesControl
All Implemented Interfaces:
com.sapportals.wdf.event.WdfEventReceiver

public class DemoPropertiesControl
extends WcmResourceControl
implements com.sapportals.wdf.event.WdfEventReceiver

Copyright 2004 SAP AG

Created November 1, 2002


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sapportals.wcm.control.base.WcmResourceControl
WcmResourceControl.ResourceNotFoundException
 
Field Summary
 
Fields inherited from class com.sapportals.wcm.control.base.WcmResourceControl
START_PAGE_BROWSE, START_PAGE_DETAILS, uri
 
Fields inherited from class com.sapportals.wcm.control.base.WcmBaseControl
BLANK_LINK_TARGET, CELL_PADDING_STANDARD, CELL_SPACING_STANDARD, CONTROL_HEADER_STANDARD, DETAILS_CONFIG_FILE, NONE, RES_BUTTON_ADD, RES_BUTTON_APPLY, RES_BUTTON_BACK, RES_BUTTON_CANCEL, RES_BUTTON_CLOSE, RES_BUTTON_LOAD, RES_BUTTON_MORE, RES_BUTTON_OK, RES_BUTTON_REMOVE, RES_BUTTON_SAVE, RES_BUTTON_SELECT, RES_BUTTON_UPDATE, resourceContext, SUMMARY
 
Fields inherited from class com.sapportals.wdf.stack.Control
id
 
Constructor Summary
DemoPropertiesControl()
          Constructor
DemoPropertiesControl(String controlID)
          Constructor
 
Method Summary
protected  void createNestedControls()
          Register PropertiesControl as pluggin
static String getContentProperties(List pp, String title)
          Just create a content using properties.
 boolean getNewResourceFlag()
          Gets the newResourceFlag attribute of the ResourceUploadControl object
 String getNr2Value()
           
 String getResourceType()
          Gets the resourceTypes attribute of the ResourcePropertiesControl object
 String getStartUri()
          Retrieve the startURI
 com.sapportals.wdf.event.WdfEvent onCancel(com.sapportals.htmlb.event.Event event)
          When "Cancel" button is selected, then this method is called
 com.sapportals.wdf.event.WdfEvent onCount10(com.sapportals.htmlb.event.Event event)
          Create a new resource
 com.sapportals.wdf.event.WdfEvent onCount20(com.sapportals.htmlb.event.Event event)
          When "Count Sum = N2+10" button is selected, then this method is called
 com.sapportals.wdf.event.WdfEvent onSum10(com.sapportals.htmlb.event.Event event)
          Save properties for the current resource
 com.sapportals.wdf.event.WdfEvent onSum20(com.sapportals.htmlb.event.Event event)
          When "Sum= Nr1 + Nr2 + 20" button is selected, then this method is called Save properties for the current resource
protected  void readInputData()
          read the value fron Nr2 field
 void receive(com.sapportals.wdf.event.WdfEvent cflEvent)
          reacts on CflResourceEvents and resets the present resource of the control.
 com.sapportals.htmlb.Component render()
          Build the UI for this control
 void setNewResourceFlag(boolean flag)
          Sets the newResourceFlag attribute of the ResourceUploadControl object
 void setNr2Value(String flag)
           
 void setResourceType(String newResourceTypes)
          Sets the resourceTypes attribute of the ResourcePropertiesControl object
 void setStartUri(String startUri)
          Set the startURI with a new value
 
Methods inherited from class com.sapportals.wcm.control.base.WcmResourceControl
checkArchivingStauts, getAOStates, getDetailsPageUri, getResource, getResourceLink, getResourceList, getSafeResource, getUri, setResource, setUri
 
Methods inherited from class com.sapportals.wcm.control.base.WcmBaseControl
getBaseBundleString, getBaseBundleString, getBaseBundleString, getBaseBundleString, getBundleString, getBundleString, getBundleString, getBundleString, getBusinessCardLink, getImage, getParameterConfiguration, getResourceContext, getServicePageUri, handleException, isSection508Rendering, isTestMode, isVisible, setControlContext, setResourceContext, setTestMode, setVisible
 
Methods inherited from class com.sapportals.wdf.stack.Control
create, create, createUnequivocallyComponentId, dispatchHtmlbEvent, dispatchWdfEvent, getControlContext, getDynPage, getID, getParent, getPersistenceComponentManager, getRootControl, getStackId, initialize, initializeImpl, isInitialized, register, 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
 

Constructor Detail

DemoPropertiesControl

public DemoPropertiesControl()
Constructor


DemoPropertiesControl

public DemoPropertiesControl(String controlID)
Constructor

Parameters:
controlID -
Method Detail

setNr2Value

public void setNr2Value(String flag)

getNr2Value

public String getNr2Value()

setResourceType

public void setResourceType(String newResourceTypes)
Sets the resourceTypes attribute of the ResourcePropertiesControl object

Parameters:
newResourceTypes - The new resourceTypes value

getResourceType

public String getResourceType()
Gets the resourceTypes attribute of the ResourcePropertiesControl object

Returns:
The resourceTypes value

getStartUri

public String getStartUri()
Retrieve the startURI

Returns:
- the value of startUri as String

setStartUri

public void setStartUri(String startUri)
Set the startURI with a new value

Parameters:
startUri - - new vakue of the startUri

setNewResourceFlag

public void setNewResourceFlag(boolean flag)
Sets the newResourceFlag attribute of the ResourceUploadControl object

Parameters:
flag - The new newResourceFlag value

getNewResourceFlag

public boolean getNewResourceFlag()
Gets the newResourceFlag attribute of the ResourceUploadControl object

Returns:
The newResourceFlag value

createNestedControls

protected void createNestedControls()
                             throws com.sapportals.wdf.WdfException
Register PropertiesControl as pluggin

Overrides:
createNestedControls in class com.sapportals.wdf.stack.Control
Throws:
com.sapportals.wdf.WdfException - Exception raised in failure situation

render

public com.sapportals.htmlb.Component render()
                                      throws com.sapportals.wdf.WdfException
Build the UI for this control

Specified by:
render in class com.sapportals.wdf.stack.Control
Returns:
A component containing the rendered control
Throws:
com.sapportals.wdf.WdfException - Exception raised in failure situation

onSum10

public com.sapportals.wdf.event.WdfEvent onSum10(com.sapportals.htmlb.event.Event event)
                                          throws WcmException
Save properties for the current resource

Throws:
WcmException

onSum20

public com.sapportals.wdf.event.WdfEvent onSum20(com.sapportals.htmlb.event.Event event)
                                          throws WcmException
When "Sum= Nr1 + Nr2 + 20" button is selected, then this method is called Save properties for the current resource

Throws:
WcmException

onCount10

public com.sapportals.wdf.event.WdfEvent onCount10(com.sapportals.htmlb.event.Event event)
                                            throws WcmException
Create a new resource

Throws:
WcmException

onCount20

public com.sapportals.wdf.event.WdfEvent onCount20(com.sapportals.htmlb.event.Event event)
                                            throws WcmException
When "Count Sum = N2+10" button is selected, then this method is called

Throws:
WcmException

onCancel

public com.sapportals.wdf.event.WdfEvent onCancel(com.sapportals.htmlb.event.Event event)
                                           throws WcmException
When "Cancel" button is selected, then this method is called

Throws:
WcmException

receive

public void receive(com.sapportals.wdf.event.WdfEvent cflEvent)
             throws com.sapportals.wdf.WdfException
Description copied from class: WcmResourceControl
reacts on CflResourceEvents and resets the present resource of the control. If controls want to implement a special treatment of these events they can implement this method themselves.

Specified by:
receive in interface com.sapportals.wdf.event.WdfEventReceiver
Overrides:
receive in class WcmResourceControl
Parameters:
cflEvent -
Throws:
com.sapportals.wdf.WdfException

readInputData

protected void readInputData()
                      throws com.sapportals.wdf.WdfException
read the value fron Nr2 field

Overrides:
readInputData in class WcmBaseControl
Throws:
com.sapportals.wdf.WdfException

getContentProperties

public static String getContentProperties(List pp,
                                          String title)
Just create a content using properties. It's just for demo purpose

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[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