Package net.sourceforge.stripes.action

Examples of net.sourceforge.stripes.action.RedirectResolution


    // Stuff necessary to implement ActionBean!
    private ActionBeanContext context;
    public ActionBeanContext getContext() { return context; }
    public void setContext(ActionBeanContext context) { this.context = context; }
    @DefaultHandler public Resolution execute() { return new RedirectResolution("/somewhere.jsp"); }
View Full Code Here


        if (bug.getOpenDate() == null)
            bug.setOpenDate(new Date());

        bm.saveOrUpdate(bug);

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

    }

    /** Saves or updates a bug, and then returns to the edit page to add another just like it. */
    public Resolution saveAndAgain() throws IOException {
        save();
        return new RedirectResolution(getClass()).addParameter("bug", getBug());
    }
View Full Code Here

        for (Bug bug : bugs) {
            bm.saveOrUpdate(bug);
        }

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

            return getContext().getSourcePageResolution();
        }
        else {
            getContext().setUser(person);
            if (this.targetUrl != null) {
                return new RedirectResolution(this.targetUrl);
            }
            else {
                return new RedirectResolution(BugListActionBean.class);
            }
        }
    }
View Full Code Here

            for (int id : deleteIds) {
                cm.deleteComponent(id);
            }
        }

        return new RedirectResolution(getClass());
    }
View Full Code Here

    /** 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

        getContext().getMessages().add(
                new LocalizableMessage(getClass().getName() + ".successMessage",
                                       this.user.getFirstName(),
                                       this.user.getUsername()));

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

            for (int id : deleteIds) {
                pm.deletePerson(id);
            }
        }

        return new RedirectResolution(getClass());
    }
View Full Code Here

        boolean authed = ((BugzookyActionBeanContext) context.getActionBeanContext()).getUser() != null;
        if (!authed && resolution == null) {
            ActionBean bean = context.getActionBean();
            if (bean != null && !bean.getClass().isAnnotationPresent(Public.class)) {
                log.warn("Thwarted attempted to access ", bean.getClass().getSimpleName());
                return new RedirectResolution(LoginActionBean.class).addParameter("targetUrl", url);
            }
        }

        log.debug("Allowing public access to ", context.getActionBean().getClass().getSimpleName());
        return resolution;
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.action.RedirectResolution

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.