org.formaria.swing.pojo
Class DialogValidationSupport
java.lang.Object
org.formaria.swing.pojo.DialogValidationSupport
- All Implemented Interfaces:
- ExceptionHandler
public class DialogValidationSupport
- extends java.lang.Object
- implements ExceptionHandler
|
Method Summary |
int |
accumulateMessages(boolean accumulate,
int level)
informs the handler when page checking is starting or stopping. |
boolean |
handleEventHandlerException(Project project,
java.lang.Object container,
java.lang.Throwable error)
Handle an exception during the invocation of a page's event handler. |
boolean |
handleException(java.lang.Object c,
java.lang.Exception ex,
java.lang.Object checker)
A method called when an exeption has been trapped. |
void |
setViewDef(java.util.List<java.lang.Object> view)
|
void |
showErrorMessage(java.lang.String msg)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DialogValidationSupport
public DialogValidationSupport(Dialog parent,
ValidationExceptionHandler veh)
setViewDef
public void setViewDef(java.util.List<java.lang.Object> view)
showErrorMessage
public void showErrorMessage(java.lang.String msg)
accumulateMessages
public int accumulateMessages(boolean accumulate,
int level)
- Description copied from interface:
ExceptionHandler
- informs the handler when page checking is starting or stopping. Typically
when it starts the page will begin to accumulate message which are to be displayed.
When the parameter is false the page will usually display the accumulated
messages
- Specified by:
accumulateMessages in interface ExceptionHandler
- Parameters:
accumulate - boolean to indicate whether the accumulation is started or stopped.level - int which indicates the most serious level of error encountered
- Returns:
- the new level which might be set to zero if a confirm dialog is displayed
handleEventHandlerException
public boolean handleEventHandlerException(Project project,
java.lang.Object container,
java.lang.Throwable error)
- Description copied from interface:
ExceptionHandler
- Handle an exception during the invocation of a page's event handler. The page
normally implements this interface and has the first chance at handling the
error. Thereafter if false is returned a central (optional) exception
handler owned by the project is invoked.
- Specified by:
handleEventHandlerException in interface ExceptionHandler
- Parameters:
project - the current projectcontainer - the pageerror - the exception or error that was thrown
- Returns:
- true to continue processing, false to stop processing
handleException
public boolean handleException(java.lang.Object c,
java.lang.Exception ex,
java.lang.Object checker)
- Description copied from interface:
ExceptionHandler
- A method called when an exeption has been trapped.
- Specified by:
handleException in interface ExceptionHandler
- Parameters:
c - Component being validatedex - The exception causedchecker - The object being used to check validity and throw exceptions.
- Returns:
- true to continue with error checking or false to suppress further
checking.