public interface WizardValidationManager
Modifier and Type | Field and Description |
---|---|
static int |
VALIDATION_FIXERROR
Value indicating that the user wishes to fix a validation error
|
static int |
VALIDATION_IGNOREERROR
Value indicating that the user wishes to ignore a validation error.
|
static int |
VALIDATION_NOMATCH
Value indicating that no matching error field was found.
|
Modifier and Type | Method and Description |
---|---|
void |
displayCommitError(String str,
Component comp)
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 |
displayYesNoValidateError(String str)
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.
|
Object |
validateModel(PModelHandle model)
Validates the model handle passed in using default validation.
|
void |
validatePage()
Collects data from the currently visible page and validates it using
default validation.
|
static final int VALIDATION_NOMATCH
static final int VALIDATION_IGNOREERROR
static final int VALIDATION_FIXERROR
void validatePage() throws PValidationException
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.
PValidationException
PValidationException
PWizardPage.validateWizardPage
Object validateModel(PModelHandle model) throws RemoteException
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.
model
- Model handle to be validated.CustomerError
if the validation failed, otherwise
null
.RemoteException
handleValidateError
,
PWizardPage.validateWizardPage
int handleValidateError(com.portal.app.util.CustomerError customerError, Component comp, boolean alertOnlyIfMatch)
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.
customerError
- A customer error object describing the error.comp
- The Component
in which to start the search for
the error.alertOnlyIfMatch
- See return
description.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.validateModel
,
PWizardPage.validateWizardPage
int displayYesNoValidateError(String str)
JOptionPane
value corresponding to the
way the error message is dismissed.str
- The error string to be displayed.JOptionPane.YES_OPTION
,
JOptionPane.NO_OPTION
, or
JOptionPane.CLOSED_OPTION
depending on
the user action.boolean handleCommitError(com.portal.app.util.CustomerError customerError, Component comp)
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.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.true
if a message has been displayed indicating
that the page is capable of handling the error; otherwise
false
.PWizardPage.handleWizardCommitError
void displayCommitError(String str, Component comp)
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.int displayYesNoMessage(String str, String title, int messageType, String property)
property
is used to
track whether the user wishes to see the message box again.)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
.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.
PDisplayOnRequestOptionMsgDlg
void displayMessage(String str, String title, int messageType, String property)
property
is used to track whether the user wishes to see the message box again.)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
.PDisplayOnRequestOptionMsgDlg
Copyright © 2003, 2023, Oracle and/or its affiliates.