Examples of AjaxModelAndView


Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

        if (view.getSubscriptionsToRemove() != null) {
            for (FeedSubscription s : view.getSubscriptionsToRemove()) {
                this.userService.removeSubscriptionToFeed(user, s);
            }
        }
        return new AjaxModelAndView(this.getSuccessView(), errors);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

        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

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

        User user = this.userHolder.getUser();
        try {
            this.userService.subscribeToFeed(user, subscription);
        } catch (SubscriptionAlreadyExistentException ex) {
            errors.reject("subscription.duplicated.name", "Subscription with the same name already existent.");
            return new AjaxModelAndView(null, errors);
        }
        return new AjaxModelAndView(this.getSuccessView(), errors);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

            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

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
        if (request.getParameter("source-element").equals("b1")) {
            throw new Exception("Exception occurred in controller!");
        }
        return new AjaxModelAndView("/start.page", errors);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

                    errors.rejectValue(error.getPropertyName(), error.getCode(), error.getMessage());
                }
                return this.showForm(request, response, errors);
            }

            return new AjaxModelAndView(this.getSuccessView(), errors);
        }
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

                errors.reject(error.getCode(), error.getMessage());
            }
            return this.showForm(request, response, errors);
        }
       
        return new AjaxModelAndView(this.getSuccessView(), errors);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

                errors.rejectValue(error.getPropertyName(), error.getCode(), error.getMessage());
            }
            return this.showForm(request, response, errors);
        }
       
        return new AjaxModelAndView(this.getSuccessView(), errors);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

        Collection<IEmployee> employees = store.getEmployeesByOffice(office);
        Map model = new HashMap(3);
       
        model.put("employees", employees);
       
        return new AjaxModelAndView(this.getSuccessView(), errors, model);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.web.servlet.AjaxModelAndView

                    errors.reject(error.getCode(), error.getMessage());
                }
                return this.showForm(request, response, errors);
            }

            return new AjaxModelAndView(this.getSuccessView(), errors);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.