SalesPoint Framework v3.0

sale.stdforms
Class FormSheetStrategy

java.lang.Object
  |
  +--sale.stdforms.FormSheetStrategy
Direct Known Subclasses:
EditButtonStrategy, MoveStrategy

public abstract class FormSheetStrategy
extends Object
implements ProcessErrorCodes, Serializable

Abstract super class of all strategies that are used with FormSheets.

Strategies are usually used to parameterize certain responses to user actions in standard FormSheets. Good examples are the parameterized responses to the buttons in a TwoTableFormSheet.

This abstract base class knows only about error handling. It uses error handling strategies so that subclasses can easily be adapted to behave differently in case of an error.

Since:
v2.0
Version:
2.0 18/08/1999
Author:
Steffen Zschaler
See Also:
Serialized Form

Inner Class Summary
static interface FormSheetStrategy.ErrorHandler
          Interface that defines a error handling strategy for a FormSheetStrategy.
 
Field Summary
static FormSheetStrategy.ErrorHandler DEFAULT_ERROR_HANDLER
          The default error handler.
protected  FormSheetStrategy.ErrorHandler m_ehErrHandler
          The current error handler.
static FormSheetStrategy.ErrorHandler MSG_POPUP_ERROR_HANDLER
          An alternative error handler that will pop up a modeless MsgForm in the process.
 
Constructor Summary
FormSheetStrategy()
           
 
Method Summary
 void error(SaleProcess p, int nErrorCode)
          Handle an error.
 void setErrorHandler(FormSheetStrategy.ErrorHandler ehErrHandler)
          Set the current error handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ERROR_HANDLER

public static final FormSheetStrategy.ErrorHandler DEFAULT_ERROR_HANDLER
The default error handler. This will pass the error on to the process' SaleProcess.error(int) method.
Hooks:
Adapt Standard FormSheet Error Handling

MSG_POPUP_ERROR_HANDLER

public static final FormSheetStrategy.ErrorHandler MSG_POPUP_ERROR_HANDLER
An alternative error handler that will pop up a modeless MsgForm in the process.
Hooks:
Adapt Standard FormSheet Error Handling

m_ehErrHandler

protected FormSheetStrategy.ErrorHandler m_ehErrHandler
The current error handler. Defaults to the DEFAULT_ERROR_HANDLER.
Constructor Detail

FormSheetStrategy

public FormSheetStrategy()
Method Detail

setErrorHandler

public void setErrorHandler(FormSheetStrategy.ErrorHandler ehErrHandler)
Set the current error handler.
Override:
Never.
Parameters:
ehErrHandler - the new error handler.
Hooks:
Adapt Standard FormSheet Error Handling

error

public void error(SaleProcess p,
                  int nErrorCode)
Handle an error.

This is delegated to the error handler.

Override:
Never.
Parameters:
p - the process in which the error occurred.
nErrorCode - an int describing the error.

SalesPoint Framework v3.0