Package org.apache.tapestry

Examples of org.apache.tapestry.PageRedirectException


                String realPage = page.substring("client:".length());
                redirect(cycle, realPage, "close");

            } else {
                if (cycle==null) {
                    throw new PageRedirectException(page);
                } else {
                    // TO_ANDY PROBLEM activating page this way.... for example canceling a flow doesn't cause the new page to be displayed.
                    // first noticed this with the SIGNUP verification flow not switching to home page when flow was canceled.
                    IPage appPage = cycle.getPage(page);
                    if ( appPage instanceof IExternalPage) {
View Full Code Here


    // TODO -- this should not be necessary any more.
    public void continueFlowState(String flowLookupKey, Map<String, String> propertyChanges) throws PageRedirectException {
        FlowState flowState = getFlowManagement().continueFlowState(flowLookupKey, true, propertyChanges);
        if (flowState != null) {
            throw new PageRedirectException(flowState.getCurrentPage());
        }
    }
View Full Code Here

            String flowPageName = flow.getCurrentPage();
            String pageName = this.getPage().getPageName();
            if( flowPageName != null && !pageName.equals(flowPageName)) {
                if (!(this.getPage() instanceof FlowAwarePage) || isEmpty(((FlowAwarePage)this.getPage()).getExpectedFlowDefinitions())
                    || !((FlowAwarePage)this.getPage()).getExpectedFlowDefinitions().contains(flow.getFlowTypeName())) {
                    throw new PageRedirectException(flowPageName);
                } else {
                    flow.setCurrentPage(pageName);
                }
            }
        }
View Full Code Here

        {
            Login login = (Login) cycle.getPage("Login");

            login.setCallback(new PageCallback(this));

            throw new PageRedirectException(login);
        }

        if (!visit.getUser(cycle).isAdmin())
        {
            VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();

            vengine.presentError("That function is restricted to adminstrators.", cycle);

            throw new PageRedirectException(cycle.getPage());
        }
    }
View Full Code Here

        Login login = (Login) getRequestCycle().getPage("Login");

        login.setCallback(new ActivateCallback(this));

        throw new PageRedirectException(login);
    }
View Full Code Here

        Login login = (Login) getRequestCycle().getPage("Login");

        login.setCallback(new PageCallback(this));

        throw new PageRedirectException(login);
    }
View Full Code Here

            IRequestCycle cycle = getRequestCycle();
            IActivate page = (IActivate) cycle.getPage("MyLibrary");

            page.activate(cycle);

            throw new PageRedirectException(page);
        }

        setBooksModel(model);
    }
View Full Code Here

        Publisher publisher = (Publisher) map.getValue();

        if (publisher == null)
        {
            setError(getMessage("out-of-date"));
            throw new PageRedirectException(this);
        }

        setPublisher(publisher);
    }
View Full Code Here

        Person user = (Person) map.getValue();

        if (user == null)
        {
            setError(getMessage("out-of-date"));
            throw new PageRedirectException(this);
        }

        setUser(user);
    }
View Full Code Here

        Login login = getLogin();

        login.setCallback(new PageCallback(this));

        throw new PageRedirectException(login);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.PageRedirectException

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.