SalesPoint Framework v3.0

Hook: Adapt Standard FormSheet Error Handling


Requirement

The error handling for a strategy of one of the standard FormSheets needs to be defined.

The standard FormSheets use strategies to allow you to modify their reactions to user events. The error handling in all these strategies can be defined in a uniform way.

Method of Adaptation
Replace Feature
Level of Support
Parameter Pattern  
HotSpot
Standard User Interaction
Participants
SpecificFormSheetStrategy , strategy , ErrorHandler, NewHandler , DEFAULT_ERROR_HANDLER, MSG_POPUP_ERROR_HANDLER

Changes

  1. instance strategy of SpecificFormSheetStrategy.
  2. choose: type of error handling?
  3. if process must be cancelled on any error, printing an error message to the user:
    1. handler = DEFAULT_ERROR_HANDLER.
  4. if an error message should appear in an extra window, but the process should not be cancelled:
    1. handler = MSG_POPUP_ERROR_HANDLER.
  5. in any other case:
    1. implementation NewHandler of ErrorHandler.
    2. NewHandler.error implements ErrorHandler.error .
    3. instance handler of NewHandler.
  6. call strategy.setErrorHandler with parameter handler.

SalesPoint Framework v3.0