com.sapportals.admin.wizardframework.components
Class AbstractWizardComponent

java.lang.Object
  |
  +--com.sapportals.admin.wizardframework.components.AbstractWizardComponent
All Implemented Interfaces:
IDependencyObject, IWizardComponent
Direct Known Subclasses:
AbstractActionComponent, AbstractInputComponent, AlignedInputComponentList, FlowContainer, GridContainer, HtmlbComponentWrapper, HTMLScriptComponent, ListDisplayComponent, ProgressBarComponent, PropertyEditorComponent, WizardComponentContainer

public class AbstractWizardComponent
extends java.lang.Object
implements IWizardComponent, IDependencyObject

The default component implementation all wizard components should inherit. While not being abstract in the java sense of the word it provides default implementations for all the functions in IWizardComponent while not defining any individual behavior by itself.

Version:
6.0

Field Summary
static int HORIZONTAL_LAYOUT
           
static int VERTICAL_LAYOUT
           
 
Constructor Summary
AbstractWizardComponent()
           
 
Method Summary
 void clearIfInconsistent(java.lang.String changedObject, IWizardContext context)
          the default implementtion clears all values from this component's branch in the session.
 void doAfterSubmit(IWizardContext context)
          the default implemention does nothing
 void doBeforeDisplay(IWizardContext context)
          the default implemention does nothing before display
 com.sapportals.htmlb.Component getControlInFocus(IWizardContext ctx)
           
 java.lang.String getDescription(IWizardContext ctx)
          Set the description of a pane - this function is relevant only for panes.
 com.sapportals.htmlb.Component getDisplay(IWizardContext context)
          the default implementation returns null - if your component has a display it should inherit AbstractDisplayComponent or AbstractInputComponent.
 java.util.List getErrorMessages(IWizardContext context)
          the default implemention returns null
 java.lang.String getPath()
          get the path of this component (internally used)
protected  java.lang.Object getProperty(java.lang.String key, IBasicEditingContext context)
          get the property stored under from the session
 java.lang.String getTitle(IWizardContext ctx)
          Set the title of a pane - this function is relevant only for panes.
 void init(IWizardContext context)
          the default implemention does nothing on init
 boolean isComplete(IWizardContext context)
          the default implemention returns true
 boolean isInitialized(IWizardContext context)
          always returns true - override this function if your component needs dynamic initialization
 boolean isMandatory()
           
 void processInput(IWizardContext context)
          the default implemention does no input processing.
 void setMandatory(boolean iMandatory)
           
 void setPath(java.lang.String iPath)
          set the path of this component. e.g. it's position in the wizard hierarchy. path components are seperated by IWizardSession.PATH_DELIMITER. example: "pane1.nameComponent.firstNameInputField".
protected  void setProperty(java.lang.String key, java.lang.Object value, IBasicEditingContext context)
          set the property under in the session
protected  void setTempProperty(java.lang.String key, java.lang.Object value, IBasicEditingContext context)
          Set the temporary property under in the session.
 void setupComponent(IWizardContext ctx)
          setup the component here. if this component is a container add all subcomponents here
 void wasChanged(IWizardContext context)
          this method should be called whenever a component is changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERTICAL_LAYOUT

public static final int VERTICAL_LAYOUT

HORIZONTAL_LAYOUT

public static final int HORIZONTAL_LAYOUT
Constructor Detail

AbstractWizardComponent

public AbstractWizardComponent()
Method Detail

setupComponent

public void setupComponent(IWizardContext ctx)
Description copied from interface: IWizardComponent
setup the component here. if this component is a container add all subcomponents here
Specified by:
setupComponent in interface IWizardComponent

getTitle

public java.lang.String getTitle(IWizardContext ctx)
Description copied from interface: IWizardComponent
Set the title of a pane - this function is relevant only for panes. It won't have any effect if used in subcomponents.
Specified by:
getTitle in interface IWizardComponent

getDescription

public java.lang.String getDescription(IWizardContext ctx)
Description copied from interface: IWizardComponent
Set the description of a pane - this function is relevant only for panes. It won't have any effect if used in subcomponents.
Specified by:
getDescription in interface IWizardComponent

setPath

public void setPath(java.lang.String iPath)
set the path of this component. e.g. it's position in the wizard hierarchy. path components are seperated by IWizardSession.PATH_DELIMITER. example: "pane1.nameComponent.firstNameInputField". If this component contains other components it will set their path in this function.
Specified by:
setPath in interface IWizardComponent

getPath

public java.lang.String getPath()
get the path of this component (internally used)
Specified by:
getPath in interface IWizardComponent

getProperty

protected java.lang.Object getProperty(java.lang.String key,
                                       IBasicEditingContext context)
get the property stored under from the session

setProperty

protected void setProperty(java.lang.String key,
                           java.lang.Object value,
                           IBasicEditingContext context)
set the property under in the session

setTempProperty

protected void setTempProperty(java.lang.String key,
                               java.lang.Object value,
                               IBasicEditingContext context)
Set the temporary property under in the session. The property will not be stored in the response and will thus be available only in this request.

isInitialized

public boolean isInitialized(IWizardContext context)
always returns true - override this function if your component needs dynamic initialization
Specified by:
isInitialized in interface IWizardComponent
Following copied from interface: com.sapportals.admin.wizardframework.api.IWizardComponent
Returns:
- has this component already been initialized?

init

public void init(IWizardContext context)
the default implemention does nothing on init
Specified by:
init in interface IWizardComponent

doBeforeDisplay

public void doBeforeDisplay(IWizardContext context)
the default implemention does nothing before display
Specified by:
doBeforeDisplay in interface IWizardComponent

getDisplay

public com.sapportals.htmlb.Component getDisplay(IWizardContext context)
the default implementation returns null - if your component has a display it should inherit AbstractDisplayComponent or AbstractInputComponent.
Specified by:
getDisplay in interface IWizardComponent

processInput

public void processInput(IWizardContext context)
the default implemention does no input processing.
Specified by:
processInput in interface IWizardComponent

doAfterSubmit

public void doAfterSubmit(IWizardContext context)
the default implemention does nothing
Specified by:
doAfterSubmit in interface IWizardComponent

wasChanged

public void wasChanged(IWizardContext context)
this method should be called whenever a component is changed. It clears all components dependent on this component or its parent components.
Specified by:
wasChanged in interface IDependencyObject

clearIfInconsistent

public void clearIfInconsistent(java.lang.String changedObject,
                                IWizardContext context)
the default implementtion clears all values from this component's branch in the session.
Specified by:
clearIfInconsistent in interface IDependencyObject

isComplete

public boolean isComplete(IWizardContext context)
the default implemention returns true

getErrorMessages

public java.util.List getErrorMessages(IWizardContext context)
the default implemention returns null
Specified by:
getErrorMessages in interface IWizardComponent
Following copied from interface: com.sapportals.admin.wizardframework.api.IWizardComponent
Returns:
- If this component was not propperly filled by the user return a list of error messages indicating the missing fields or inconsistencies, otherwise return null;

isMandatory

public boolean isMandatory()
Specified by:
isMandatory in interface IWizardComponent

setMandatory

public void setMandatory(boolean iMandatory)
Specified by:
setMandatory in interface IWizardComponent
Following copied from interface: com.sapportals.admin.wizardframework.api.IWizardComponent
Parameters:
is - this component (i.e. the property it collects) a mandatory part of the pane the component resides in? this will influence the display of the component and the behavior of the pane (error messages are displayed only for mandatory components)

getControlInFocus

public com.sapportals.htmlb.Component getControlInFocus(IWizardContext ctx)
Specified by:
getControlInFocus in interface IWizardComponent