Interface WizardValidationManager

All Known Implementing Classes:
PAccountCreationWizard, PPurchaseOfferingWizard, PValidatingWizard

public interface WizardValidationManager
Specification for wizard page validation support including validation-time and commit data-time error handling support.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Value indicating that the user wishes to fix a validation error
    static final int
    Value indicating that the user wishes to ignore a validation error.
    static final int
    Value indicating that no matching error field was found.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Puts up a simple commit-time error message.
    void
    displayMessage(String str, String title, int messageType, String property)
    Puts up a simple message with a dismiss button unless the message has been flagged as wanting to be ingnored.
    int
    displayYesNoMessage(String str, String title, int messageType, String property)
    Puts up a Yes/No message and returns a value corresponding to the way the message is dismissed unless the message has been flagged as wanting to be ingnored.
    int
    Puts up a validate-time error message and returns a JOptionPane value corresponding to the way the error message is dismissed.
    boolean
    handleCommitError(com.portal.app.util.CustomerError customerError, Component comp)
    Alerts the user if the passed in component is capable of handling the passed-in commit-time error.
    int
    handleValidateError(com.portal.app.util.CustomerError customerError, Component comp, boolean alertOnlyIfMatch)
    Handles a validation error on the current page and returns information about the user's response.
    Validates the model handle passed in using default validation.
    void
    Collects data from the currently visible page and validates it using default validation.
  • Field Details

    • VALIDATION_NOMATCH

      static final int VALIDATION_NOMATCH
      Value indicating that no matching error field was found.
      See Also:
    • VALIDATION_IGNOREERROR

      static final int VALIDATION_IGNOREERROR
      Value indicating that the user wishes to ignore a validation error.
      See Also:
    • VALIDATION_FIXERROR

      static final int VALIDATION_FIXERROR
      Value indicating that the user wishes to fix a validation error
      See Also:
  • Method Details

    • validatePage

      void validatePage() throws PValidationException
      Collects data from the currently visible page and validates it using default validation. If an error is encountered, then if it contains enough information to auto-locate the field associated with the error, the field is marked. If there is error text associated with the error, it is displayed in a message box. If there is no error text associated with the error, a generic validation error message is displayed. If the user elects to fix the error then this method throws a PValidationException.

      The wizard framework will call validateWizardPage on a page at page-switch time. If the page wishes to it can have the validation manager do default validation on the page by calling this method.

      Throws:
      PValidationException
      See Also:
      • invalid reference
        PWizardPage.validateWizardPage
    • validateModel

      Object validateModel(PModelHandle model) throws RemoteException
      Validates the model handle passed in using default validation.

      The wizard framework will call validateWizardPage on a page at page-switch time. If the page wishes to it can do its own data collection but have the validation manager do default validation of the model handle by calling this method. The page itself can then analyze and act upon any returned error and/or it can have the validation manager handle the error.

      Parameters:
      model - Model handle to be validated.
      Returns:
      CustomerError if the validation failed, otherwise null.
      Throws:
      RemoteException
      See Also:
    • handleValidateError

      int handleValidateError(com.portal.app.util.CustomerError customerError, Component comp, boolean alertOnlyIfMatch)
      Handles a validation error on the current page and returns information about the user's response. If the error passed in has sufficient information to auto-locate the field associated with the error, the field is marked. If there is error text associated with the error passed in, it is displayed in a message box. If there isn't any error information passed in, a generic validation error message is displayed.
      If the alertOnlyIfMatch flag is set, then only if a field matching the error is found will an error message be displayed.

      The wizard framework will call validateWizardPage on a page at page-switch time. If the page wishes to it can do its own data collection and error determination. The page can then call this method on the validation manager to handle the error.

      Parameters:
      customerError - A customer error object describing the error.
      comp - The Component in which to start the search for the error.
      alertOnlyIfMatch - See return description.
      Returns:
      VALIDATION_IGNOREERROR if the user chooses to ignore the validation error or VALIDATION_FIXERROR if the user chooses to fix the error. If the alertOnlyIfMatch flag is set, then if no matching error field is found VALIDATION_NOMATCH is returned.
      See Also:
    • displayYesNoValidateError

      int displayYesNoValidateError(String str)
      Puts up a validate-time error message and returns a JOptionPane value corresponding to the way the error message is dismissed.
      Parameters:
      str - The error string to be displayed.
      Returns:
      JOptionPane.YES_OPTION, JOptionPane.NO_OPTION, or JOptionPane.CLOSED_OPTION depending on the user action.
    • handleCommitError

      boolean handleCommitError(com.portal.app.util.CustomerError customerError, Component comp)
      Alerts the user if the passed in component is capable of handling the passed-in commit-time error. If the error passed in has sufficient information to auto-locate the field associated with the error, the field is marked and if there is error text associated with the error, it is displayed in a message box or if there is no error text then a generic message is displayed.
      The wizard framework will successively call handleWizardCommitError on each page after a commit-time failure until a page claims the error. If the page wishes to it can call this method on the validation manager to do default error determination.
      Parameters:
      customerError - A customer error object describing the error.
      comp - The Component in which to start the search for the error. If the auto-locate search attempt is successful, the (top-level) wizard page containing comp is switched to before the error message is displayed.
      Returns:
      true if a message has been displayed indicating that the page is capable of handling the error; otherwise false.
      See Also:
      • invalid reference
        PWizardPage.handleWizardCommitError
    • displayCommitError

      void displayCommitError(String str, Component comp)
      Puts up a simple commit-time error message.
      Parameters:
      str - The error string to be displayed. If the string is null, a default commit failure message is displayed.
      comp - The (top-level) wizard page containing comp will be switched to before the error is displayed. If null, no page switch will occur.
    • displayYesNoMessage

      int displayYesNoMessage(String str, String title, int messageType, String property)
      Puts up a Yes/No message and returns a value corresponding to the way the message is dismissed unless the message has been flagged as wanting to be ingnored. (The dialog can be made to contain a "Don't remind me again" checkbox. property is used to track whether the user wishes to see the message box again.)
      Parameters:
      str - Message to display.
      title - Message box title.
      messageType - A JOptionPane message type.
      property - If null the message is displayed in a normal message dialog. If non-null the message is displayed in a PDisplayOnRequestOptionMsgDlg.
      Returns:
      If property is null, JOptionPane.YES_OPTION, JOptionPane.NO_OPTION, or JOptionPane.CLOSED_OPTION is returned depending on the user action. If property is non-null, PDisplayOnRequestOptionMsgDlg.HIDE_DIALOG is another possible return value.
      See Also:
      • invalid reference
        PDisplayOnRequestOptionMsgDlg
    • displayMessage

      void displayMessage(String str, String title, int messageType, String property)
      Puts up a simple message with a dismiss button unless the message has been flagged as wanting to be ingnored. (The dialog can be made to contain a "Don't remind me again" checkbox. property is used to track whether the user wishes to see the message box again.)
      Parameters:
      str - The message to display. If the string is null, a default validation failure message is displayed.
      title - The title to be displayed. If the string is null, a default validation failure title is displayed.
      messageType - A JOptionPane message type.
      property - If null the message is displayed in a normal message dialog. If non-null the message is displayed in a PDisplayOnRequestOptionMsgDlg.
      See Also:
      • invalid reference
        PDisplayOnRequestOptionMsgDlg