Examples of PageRenderRequestParameters


Examples of org.apache.tapestry5.services.PageRenderRequestParameters

                .collectPageActivationContext(canonical);

        boolean loopback = canonical.equals(requestGlobals.getActivePageName())
                && pageCache.get(pageName).hasResetListeners();

        PageRenderRequestParameters parameters = new PageRenderRequestParameters(canonical, new ArrayEventContext(
                typeCoercer, context), loopback);

        Link link = linkEncoder.createPageRenderLink(parameters);

        for (LinkCreationListener2 listener : listeners)
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

        return parameters;
    }

    public PageRenderRequestParameters decodePageRenderRequest(Request request)
    {
        PageRenderRequestParameters parameters = linkTransformer.decodePageRenderRequest(request);

        if (parameters == null)
            parameters = delegate.decodePageRenderRequest(request);

        return parameters;
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

        final String pageName = this.resolver.resolvePageClassNameToPageName(pageClass.getName());

        final EventContext context = activationContext == null ? new EmptyEventContext() : new ArrayEventContext(
                this.typeCoercer, activationContext);

        this.handler.handle(new PageRenderRequestParameters(pageName, context, false));
    }
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

    {
        this.componentClassResolver = componentClassResolver;
        this.handler = handler;
        this.startPageName = startPageName;

        parameters = new PageRenderRequestParameters(this.startPageName, EMPTY_CONTEXT, false);
    }
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

        train_isSecure(request, true);

        replay();

        PageRenderRequestParameters parameters = new PageRenderRequestParameters(PAGE_NAME, new EmptyEventContext(),
                false);

        RequestSecurityManager manager = new RequestSecurityManagerImpl(request, response, encoder, locator, true);

        assertFalse(manager.checkForInsecurePageRenderRequest(parameters));
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

        train_isSecure(locator, PAGE_NAME, false);

        replay();

        PageRenderRequestParameters parameters = new PageRenderRequestParameters(PAGE_NAME, new EmptyEventContext(),
                false);

        RequestSecurityManager manager = new RequestSecurityManagerImpl(request, response, encoder, locator, true);

        assertFalse(manager.checkForInsecurePageRenderRequest(parameters));
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

        train_isSecure(request, false);

        train_isSecure(locator, PAGE_NAME, true);

        PageRenderRequestParameters parameters = new PageRenderRequestParameters(PAGE_NAME, new EmptyEventContext(),
                false);

        train_createPageRenderLink(encoder, parameters, link);

        response.sendRedirect(link);
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

        replay();

        PageRenderRequestHandler handler = new PageRenderRequestHandlerImpl(cache, processor, renderer, activator, request);

        PageRenderRequestParameters parameters = new PageRenderRequestParameters("foo/Bar", context, true);

        handler.handle(parameters);

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

    }

    @Override
    public boolean dispatch(final Request tapestryRequest, final Response tapestryResponse)
            throws IOException {
        final PageRenderRequestParameters requestParameters = this.componentEventLinkEncoder
                .decodePageRenderRequest(tapestryRequest);

        if (requestParameters == null) {
            return false;
        }

        final Component previousPage;

        final BreadCrumbList breadCrumbList = this.applicationStateManager.get(BreadCrumbList.class);
        if (breadCrumbList.size() > 0) {
            final BreadCrumbInfo lastCrumb = breadCrumbList.getLastCrumb();
            previousPage = this.componentSource.getPage(lastCrumb.getPageName());
        } else {
            previousPage = null;
        }

        /* Is the requested page tagged with BreadCrumb- or BreadCrumbReset-annotation? */
        final Component page = this.componentSource.getPage(requestParameters.getLogicalPageName());

        final BreadCrumbReset reset = this.findAnnotation(page.getClass(), BreadCrumbReset.class);
        if (reset != null) {
            if (previousPage == null
                    || !this.previousPageIsIgnored(previousPage.getClass(), reset.ignorePages())) {
                breadCrumbList.reset();
            }
        }

        final BreadCrumbInfo breadCrumbInfo;
        final BreadCrumb annotation = this.findAnnotation(page.getClass(), BreadCrumb.class);
        if (annotation != null) {
            final String titleKey = annotation.titleKey();

            final EventContext context = requestParameters.getActivationContext();

            final Link link = this.pageRenderLinkSource.createPageRenderLinkWithContext(
                    requestParameters.getLogicalPageName(), context);
            breadCrumbInfo = new BreadCrumbInfo(titleKey, link,
                    requestParameters.getLogicalPageName());

        } else {
            breadCrumbInfo = new BreadCrumbInfo(requestParameters.getLogicalPageName());
        }
        breadCrumbList.add(breadCrumbInfo);

        return false;
    }
View Full Code Here

Examples of org.apache.tapestry5.services.PageRenderRequestParameters

            PageLinkTarget pageLinkTarget = (PageLinkTarget) target;

            EventContext activationContext
                    = new URLEventContext(contextValueEncoder, invocation.getContext());
            PageRenderRequestParameters parameters = new PageRenderRequestParameters(pageLinkTarget.getPageName(),
                                                                                     activationContext);

            pageRenderRequestHandler.handle(parameters);

            return markupWriterFactory.getLatestMarkupWriter().getDocument();
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.