protected void onEval ( ) { Node control = getSrcControl ( ) ; if ( hasErrors . get ( ) ) { control . pseudoClassStateChanged ( PSEUDO_CLASS_ERROR , true ) ; if ( control instanceof Control ) { Tooltip controlTooltip = ( ( Control ) control ) . getTooltip ( ) ; if ( controlTooltip != null && ! controlTooltip . getStyleClass ( ) . contains ( "error-tooltip" ) ) { tooltip = ( ( Control ) control ) . getTooltip ( ) ; } errorTooltip . setText ( getMessage ( ) ) ; ( ( Control ) control ) . setTooltip ( errorTooltip ) ; } } else { if ( control instanceof Control ) { Tooltip controlTooltip = ( ( Control ) control ) . getTooltip ( ) ; if ( ( controlTooltip != null && controlTooltip . getStyleClass ( ) . contains ( "error-tooltip" ) ) || ( controlTooltip == null && tooltip != null ) ) { ( ( Control ) control ) . setTooltip ( tooltip ) ; } tooltip = null ; } control . pseudoClassStateChanged ( PSEUDO_CLASS_ERROR , false ) ; } }
this method will update the source control after evaluating the validation condition