com.sap.portal.admin.studio

Class PropertyEditorComponent

java.lang.Object
  extended by com.sapportals.admin.wizardframework.components.AbstractWizardComponent
      extended by com.sap.portal.admin.studio.PropertyEditorComponent
All Implemented Interfaces:
IDependencyObject, IWizardComponent

public class PropertyEditorComponent
extends AbstractWizardComponent

The class that represents the property editor component. This component renders the property editor and handles its events.


Field Summary
 
Fields inherited from class com.sapportals.admin.wizardframework.components.AbstractWizardComponent
HORIZONTAL_LAYOUT, VERTICAL_LAYOUT
 
Constructor Summary
PropertyEditorComponent(String objectId, boolean readOnly, String resetEventName)
          A constructor that sets an object ID, indicates whether the property editor is read-only, and sets a reset event name.
 
Method Summary
 com.sapportals.htmlb.Component getDisplay(IWizardContext context)
          Gets the HTMLB component to display.
 String getObjectId()
          Gets the ID of the object edited by the property editor.
static String getPEErrorMessage(IBasicEditingContext context)
          Gets the error message for the property editor.
static com.sap.portal.admin.propertyeditor.api.PEState getPEState(IBasicEditingContext context)
          Gets the state of the property editor that was saved in the context.
protected  com.sap.portal.admin.propertyeditor.api.IPropertyEditor getPropertyEditor(IWizardContext context)
          Gets the property editor object.
 int getWidth(IWizardContext context)
          Gets the width of the property editor.
 boolean isReadOnly()
          Indicates whether this property editor is read-only.
 void processInput(IWizardContext context)
          Saves to the data model the values entered into wizard controls by the administrator.
 void setObjectId(String objectId, IWizardContext context)
          Sets an ID for the object edited by the property editor.
 void setReadOnly(boolean b)
          Sets the property editor as read-only.
 
Methods inherited from class com.sapportals.admin.wizardframework.components.AbstractWizardComponent
clearIfInconsistent, doAfterSubmit, doBeforeDisplay, getControlInFocus, getDescription, getErrorMessages, getPath, getProperty, getTitle, init, isComplete, isInitialized, isMandatory, setMandatory, setPath, setProperty, setTempProperty, setupComponent, wasChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyEditorComponent

public PropertyEditorComponent(String objectId,
                               boolean readOnly,
                               String resetEventName)
A constructor that sets an object ID, indicates whether the property editor is read-only, and sets a reset event name.

Parameters:
objectId - the object ID
readOnly - true to indicate that this property editor is read-only, false if not
resetEventName - the name of the event that triggers a reset
Method Detail

getDisplay

public com.sapportals.htmlb.Component getDisplay(IWizardContext context)
Description copied from class: AbstractWizardComponent
Gets the HTMLB component to display. If your component has a display it should inherit AbstractDisplayComponent or AbstractInputComponent. The default implementation returns null.

Specified by:
getDisplay in interface IWizardComponent
Overrides:
getDisplay in class AbstractWizardComponent
Parameters:
context - the current wizard context
Returns:
the component, null if the component has no display

setObjectId

public void setObjectId(String objectId,
                        IWizardContext context)
Sets an ID for the object edited by the property editor.

Parameters:
objectId - the object ID
context - the wizard context

getObjectId

public String getObjectId()
Gets the ID of the object edited by the property editor.

Returns:
the object ID

getPEErrorMessage

public static String getPEErrorMessage(IBasicEditingContext context)
Gets the error message for the property editor.

Parameters:
context - the editing context
Returns:
the error message, or null if there is no error message

getPEState

public static com.sap.portal.admin.propertyeditor.api.PEState getPEState(IBasicEditingContext context)
Gets the state of the property editor that was saved in the context.

Parameters:
context - the editing context
Returns:
the state of the property editor, or null if no property editor is defined

setReadOnly

public void setReadOnly(boolean b)
Sets the property editor as read-only.

Parameters:
b - true if this property editor is read-only, false if not

isReadOnly

public boolean isReadOnly()
Indicates whether this property editor is read-only.

Returns:
true if this property editor is read-only, false if not

getWidth

public int getWidth(IWizardContext context)
Gets the width of the property editor.

Parameters:
context - the current wizard context
Returns:
the width of the property editor

processInput

public void processInput(IWizardContext context)
Description copied from class: AbstractWizardComponent
Saves to the data model the values entered into wizard controls by the administrator. The default implementation calls the pane�s myProcessInput method, and then calls processInput on all the wizard components within the pane.
Implement this method to save to the data model the data from any HTMLB controls that you created in the pane.
This method is called after a user clicks a toolbar button, causing a new request to be made to the wizard component.

Specified by:
processInput in interface IWizardComponent
Overrides:
processInput in class AbstractWizardComponent
Parameters:
context - the current wizard context

getPropertyEditor

protected com.sap.portal.admin.propertyeditor.api.IPropertyEditor getPropertyEditor(IWizardContext context)
Gets the property editor object.

Parameters:
context - the current wizard context
Returns:
the property editor object
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-RUNTIME [sap.com] tc/ep/admin/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice