@ Override protected void onError ( final AjaxRequestTarget _target ) { if ( this . errorHandling ) { final FeedbackCollector collector = new FeedbackCollector ( getForm ( ) . getPage ( ) ) ; final List < FeedbackMessage > msgs = collector . collect ( ) ; final StringBuilder html = new StringBuilder ( ) . append ( "<table class=\"eFapsValidateFieldValuesTable\">" ) ; for ( final FeedbackMessage msg : msgs ) { msg . getReporter ( ) . add ( AttributeModifier . append ( "class" , "invalid" ) ) ; _target . add ( msg . getReporter ( ) ) ; Serializable warn = null ; if ( msg . getMessage ( ) instanceof ValidationErrorFeedback ) { // look if a message was set warn = ( ( ValidationErrorFeedback ) msg . getMessage ( ) ) . getMessage ( ) ; // still no message, create one if ( warn == null ) { warn = ( ( ValidationErrorFeedback ) msg . getMessage ( ) ) . getError ( ) . getErrorMessage ( new ErrorMessageResource ( ) ) ; } } String label = "" ; if ( msg . getReporter ( ) instanceof IFieldConfig ) { label = ( ( IFieldConfig ) msg . getReporter ( ) ) . getFieldConfig ( ) . getLabel ( ) ; } html . append ( "<tr><td>" ) . append ( label ) . append ( ":</td><td>" ) . append ( warn ) . append ( "</td></tr>" ) ; } html . append ( "</table>" ) ; final ModalWindowContainer modal = ( ( AbstractContentPage ) getComponent ( ) . getPage ( ) ) . getModal ( ) ; modal . setInitialWidth ( 350 ) ; modal . setInitialHeight ( 200 ) ; modal . setPageCreator ( new ModalWindow . PageCreator ( ) { private static final long serialVersionUID = 1L ; @ Override public Page createPage ( ) { return new DialogPage ( ( ( AbstractContentPage ) getComponent ( ) . getPage ( ) ) . getPageReference ( ) , html . toString ( ) , true , false ) ; } } ) ; modal . show ( _target ) ; } }
Default means nothing is done on error .