private boolean checkForRequired ( final AjaxRequestTarget _target ) { AjaxSubmitCloseButton . LOG . trace ( "entering checkForRequired" ) ; boolean ret = true ; if ( ! ( getForm ( ) . getParent ( ) . getDefaultModel ( ) instanceof TableModel ) ) { final IRequestParameters parameters = getRequest ( ) . getRequestParameters ( ) ; final List < FormPanel > panels = getFormPanels ( ) ; for ( final FormPanel panel : panels ) { for ( final Entry < String , Label > entry : panel . getRequiredComponents ( ) . entrySet ( ) ) { final StringValue value = parameters . getParameterValue ( entry . getKey ( ) ) ; if ( value . isNull ( ) || value . isEmpty ( ) ) { final Label label = entry . getValue ( ) ; label . add ( AttributeModifier . replace ( "class" , "eFapsFormLabelRequiredForce" ) ) ; _target . add ( label ) ; ret = false ; } } } if ( ! ret ) { showDialog ( _target , "MandatoryDialog" , false , false ) ; } } return ret ; }
Method checking if the mandatory field of the Form are filled with a value and if not opens a WarnDialog and marks the fields in the Form via Ajax .