private boolean validateForm ( final AjaxRequestTarget _target , final Map < String , String [ ] > _other , final List < Classification > _classifications ) throws EFapsException { AjaxSubmitCloseButton . LOG . trace ( "entering validateForm" ) ; boolean ret = true ; if ( ! this . validated ) { final TargetMode mode ; if ( getForm ( ) . getPage ( ) . getDefaultModelObject ( ) instanceof IModeObject ) { mode = ( ( IModeObject ) getForm ( ) . getPage ( ) . getDefaultModelObject ( ) ) . getMode ( ) ; } else { mode = TargetMode . UNKNOWN ; } final List < Object > tuplets = new ArrayList <> ( ) ; tuplets . add ( ParameterValues . OTHERS ) ; tuplets . add ( _other ) ; tuplets . add ( ParameterValues . ACCESSMODE ) ; tuplets . add ( mode ) ; if ( getPage ( ) . getDefaultModelObject ( ) instanceof AbstractUIPageObject ) { tuplets . add ( ParameterValues . OIDMAP4UI ) ; tuplets . add ( ( ( AbstractUIPageObject ) getForm ( ) . getPage ( ) . getDefaultModelObject ( ) ) . getUiID2Oid ( ) ) ; } if ( _classifications . size ( ) > 0 ) { tuplets . add ( ParameterValues . CLASSIFICATIONS ) ; tuplets . add ( _classifications ) ; } final List < Return > returns = ( ( ICmdUIObject ) getPage ( ) . getDefaultModelObject ( ) ) . executeEvents ( EventType . UI_VALIDATE , tuplets . toArray ( ) ) ; boolean goOn = true ; boolean sniplett = false ; String key = "" ; for ( final Return oneReturn : returns ) { if ( oneReturn . get ( ReturnValues . VALUES ) != null || oneReturn . get ( ReturnValues . SNIPLETT ) != null ) { if ( oneReturn . get ( ReturnValues . VALUES ) != null ) { key = key + ( String ) oneReturn . get ( ReturnValues . VALUES ) ; } else { key = key + ( String ) oneReturn . get ( ReturnValues . SNIPLETT ) ; sniplett = true ; } ret = false ; if ( oneReturn . get ( ReturnValues . TRUE ) == null ) { goOn = false ; } } else { if ( oneReturn . get ( ReturnValues . TRUE ) == null ) { ret = false ; // that is the case if it is wrong configured! } } } if ( ! ret ) { showDialog ( _target , key , sniplett , goOn ) ; } } return ret ; }
Executes the Validation - Events related to the CommandAbstract which called this Form .