protected ModelAndView onSubmit( HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception { String remoteUser = userManager.getRemoteUsername(request); MigrateDirectoryUsersCommand migrateUsersCommand = (MigrateDirectoryUsersCommand) command; migrateUsers( migrateUsersCommand.getFromDirectoryId(), migrateUsersCommand.getToDirectoryId(), remoteUser, migrateUsersCommand, errors); if (errors.hasErrors()) { return showForm(request, response, errors, referenceData(request)); } return showForm(request, response, errors, referenceData(request)); }