private Boolean validate ( final DragAndDropEvent event ) { final Transferable transferable = event . getTransferable ( ) ; final Component compsource = transferable . getSourceComponent ( ) ; if ( ! ( compsource instanceof AbstractTable ) ) { uiNotification . displayValidationError ( getI18n ( ) . getMessage ( getActionNotAllowedMessage ( ) ) ) ; return false ; } final TableTransferable tabletransferable = ( TableTransferable ) transferable ; final AbstractTable < ? > source = ( AbstractTable < ? > ) tabletransferable . getSourceComponent ( ) ; if ( ! validateIfSourceIsTargetTable ( source ) && ! hasTargetUpdatePermission ( ) ) { return false ; } final Set < Long > deletedEntityByTransferable = source . getSelectedEntitiesByTransferable ( tabletransferable ) ; if ( deletedEntityByTransferable . isEmpty ( ) ) { final String actionDidNotWork = getI18n ( ) . getMessage ( "message.action.did.not.work" ) ; uiNotification . displayValidationError ( actionDidNotWork ) ; return false ; } return true ; }
Validate the drop .