public boolean preValidation ( ) { String currentTabName = parent . getCurrent ( ) . getCurrentTabName ( ) ; String tabName = null ; String firstInvalidTabName = null ; boolean reload = false ; for ( Map . Entry < String , SheetConfiguration > entry : parent . getSheetConfigMap ( ) . entrySet ( ) ) { tabName = entry . getKey ( ) ; // if not reload and tabname==current then skip reloading. if ( reload || ( ! tabName . equals ( currentTabName ) ) ) { parent . getWebSheetLoader ( ) . prepareWorkShee ( tabName ) ; reload = true ; } if ( ! parent . getValidationHandler ( ) . validateCurrentPage ( ) && ( firstInvalidTabName == null ) ) { firstInvalidTabName = tabName ; } } if ( firstInvalidTabName != null ) { if ( ! tabName . equals ( firstInvalidTabName ) ) { parent . getHelper ( ) . getWebSheetLoader ( ) . loadWorkSheet ( firstInvalidTabName ) ; } return false ; } return true ; }
triggered validation process before actions like save or submit .