Examples of RedirectResolution


Examples of com.blogger.tcuri.appserver.resolution.RedirectResolution

     * @param path
     *            リダイレクトするパス
     * @return RedirectResolutionクラスのインスタンス
     */
    public Resolution redirect(String path) {
        return new RedirectResolution(path);
    }
View Full Code Here

Examples of com.github.dynamicextensionsalfresco.webscripts.resolutions.RedirectResolution

@Component
@WebScript(families = "control panel")
public class IndexHandler extends AbstractControlPanelHandler {
  @Uri("/dynamic-extensions/")
  public Resolution redirectToBundles(@Attribute final ResponseHelper response) {
    return new RedirectResolution(Urls.BUNDLES);
  }
View Full Code Here

Examples of net.sourceforge.stripes.action.RedirectResolution

       
        try{
        service.create(user);}
        catch(PersistenceException ex){
            getContext().getMessages().add(new LocalizableError("usernameTaken", user));
            return new RedirectResolution("/registration.jsp?reg_error=1");
        }
       
        getContext().getMessages().add(new LocalizableError(
        getClass().getName() + ".successMessage", this.user.getName(), this.user.getPassword()
            ));
    return new RedirectResolution("/login.jsp");
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.RedirectResolution

       
        try{
        service.create(user);}
        catch(PersistenceException ex){
            getContext().getMessages().add(new LocalizableError("usernameTaken", user));
            return new RedirectResolution("/registration.jsp?reg_error=1");
        }
       
        getContext().getMessages().add(new LocalizableError(
        getClass().getName() + ".successMessage", this.user.getName(), this.user.getPassword()
            ));
    return new RedirectResolution("/login.jsp");
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.RedirectResolution

public class DDTroopsExceptionHandler extends DefaultExceptionHandler {
    public Resolution handleConstrainViolationException(JpaSystemException exc, HttpServletRequest request, HttpServletResponse response) {

        Pattern p = Pattern.compile("/(?<name>\\w+)/.*");
        Matcher matcher = p.matcher(request.getServletPath());
        return new RedirectResolution(matcher.replaceAll("/${name}/all?error=constraint"));
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.RedirectResolution

    /** A very simple add event that returns a Redirect reslution. */
    @HandlesEvent("addAndRedirect")
    public Resolution addAndRedirect() {
        this.result = lhs + rhs;
        return new RedirectResolution("/mock/success.jsp");
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.RedirectResolution

        accountService.changePreferences(userInformation.getUserId(), newPreferences);
        getContext().setUserInformation(
            userInformation.withPreferences(newPreferences));
        getContext().getMessages().add(new ScopedLocalizableMessage(ChangePreferredLocaleActionBean.class,
                                                                    "preferredLocaleChanged"));
        return new RedirectResolution(PreferencesActionBean.class);
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.RedirectResolution

     * Cancels the change
     * @return a redirect resolution to the preferences page
     */
    @DontBind
    public Resolution cancel() {
        return new RedirectResolution(PreferencesActionBean.class);
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.RedirectResolution

            TimeZone timeZone = getContext().getTimeZone();
            DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.FULL, getContext().getLocale());
            dateFormat.setTimeZone(timeZone);
            DateFormat timeFormat = DateFormat.getTimeInstance(DateFormat.MEDIUM, getContext().getLocale());
            timeFormat.setTimeZone(timeZone);
            RedirectResolution loginHistoryResolution = new RedirectResolution(LoginHistoryActionBean.class);
            String loginHistoryUrl =
                StringEscapeUtils.escapeHtml(
                     loginHistoryResolution.getUrl(getContext().getLocale()));
            getContext().getMessages().add(new ScopedLocalizableMessage(LoginActionBean.class,
                                                                        "loginSucceededWithLastLogin",
                                                                        dateFormat.format(historicLogin.getDate()),
                                                                        timeFormat.format(historicLogin.getDate()),
                                                                        historicLogin.getIp(),
                                                                        loginHistoryUrl));
        }

        if (requestedUrl != null) {
            return new RedirectResolution(requestedUrl, false);
        }

        return new RedirectResolution(CardsActionBean.class);
    }
View Full Code Here

Examples of net.sourceforge.stripes.action.RedirectResolution

     * @return a redirect resolution to the welcome page
     */
    @DontValidate
    public Resolution logout() {
        getContext().logout();
        return new RedirectResolution(IndexActionBean.class);
    }
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.