Package org.springmodules.feedxt.event

Examples of org.springmodules.feedxt.event.LoginEvent


        String username = form.getUsername();
        String password = form.getPassword();
        User user = this.userService.getUserAccount(username, password);
        if (user != null) {
            this.userHolder.setUser(user);
            this.applicationEventPublisher.publishEvent(new LoginEvent(this, request.getSession(), user));
            return new AjaxModelAndView(this.getSuccessView(), errors);
        } else {
            errors.reject("wrong.login", "Wrong username or password.");
            return new AjaxModelAndView(null, errors);
        }
View Full Code Here


        SignUpUserView factoryView = (SignUpUserView) command;
        User user = (User) factoryView.makeUser();
        try {
            this.userService.signUpUserAccount(user, factoryView.getUsername(), factoryView.getPassword());
            this.userHolder.setUser(user);
            this.applicationEventPublisher.publishEvent(new LoginEvent(this, request.getSession(), user));
        } catch (UserAlreadyExistentException ex) {
            errors.reject("user.duplicated.username", "Username already existent.");
            return new AjaxModelAndView(null, errors);
        }
        return new AjaxModelAndView(this.getSuccessView(), errors);
View Full Code Here

TOP

Related Classes of org.springmodules.feedxt.event.LoginEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.