com.sapportals.admin.wizardframework.components

Class AbstractWizardComponent

java.lang.Object
  extended bycom.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 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.


Field Summary
static int HORIZONTAL_LAYOUT
           
static int VERTICAL_LAYOUT
           
 
Constructor Summary
AbstractWizardComponent()
           
 
Method Summary
 void clearIfInconsistent(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
 Component getControlInFocus(IWizardContext ctx)
           
 String getDescription(IWizardContext ctx)
          Set the description of a pane - this function is relevant only for panes.
 Component getDisplay(IWizardContext context)
          the default implementation returns null - if your component has a display it should inherit AbstractDisplayComponent or AbstractInputComponent.
 List getErrorMessages(IWizardContext context)
          the default implemention returns null
 String getPath()
          get the path of this component (internally used)
protected  Object getProperty(String key, IBasicEditingContext context)
          get the property stored under from the session
 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(String iPath)
          set the path of this component. e.g. it's position in the wizard hierarchy.
protected  void setProperty(String key, Object value, IBasicEditingContext context)
          set the property under in the session
protected  void setTempProperty(String key, 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
See Also:
Constant Field Values

HORIZONTAL_LAYOUT

public static final int HORIZONTAL_LAYOUT
See Also:
Constant Field Values
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 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 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(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 String getPath()
get the path of this component (internally used)

Specified by:
getPath in interface IWizardComponent

getProperty

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


setProperty

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


setTempProperty

protected void setTempProperty(String key,
                               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
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 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(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 List getErrorMessages(IWizardContext context)
the default implemention returns null

Specified by:
getErrorMessages in interface 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

getControlInFocus

public Component getControlInFocus(IWizardContext ctx)
Specified by:
getControlInFocus in interface IWizardComponent


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. 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.