Package org.apache.tapestry5.internal.structure

Examples of org.apache.tapestry5.internal.structure.Page$Stats


                                       String nestedId,
                                       String eventType,
                                       boolean forForm,
                                       Object... context)
    {
        Page primaryPage = mockPage();
        PageRenderQueue queue = mockPageRenderQueue();
        PageActivationContextCollector collector = mockPageActivationContextCollector();
        LinkCreationListener listener = mockLinkCreationListener();
        ComponentEventLinkEncoder linkEncoder = mockComponentEventLinkEncoder();
        Link link = mockLink();
View Full Code Here


        if (!hasHandler)
            return EMPTY;

        // Get or create a page instance and trigger the event.

        Page page = requestPageCache.get(pageName);

        ComponentPageElement element = page.getRootElement();

        final Holder<Object[]> holder = Holder.create();

        ComponentEventCallback callback = new ComponentEventCallback()
        {
View Full Code Here

    {
        String pageName = "mypage";
        ComponentModel model = mockComponentModel();
        ComponentModelSource modelSource = mockComponentModelSource();
        RequestPageCache pageCache = mockRequestPageCache();
        Page page = mockPage();
        ComponentPageElement element = mockComponentPageElement();
        expect(modelSource.getPageModel(pageName)).andReturn(model);

        expect(model.handlesEvent(EventConstants.PASSIVATE)).andReturn(true);
View Full Code Here

    {
        ComponentModelSource modelSource = mockComponentModelSource();
        RequestPageCache pageCache = mockRequestPageCache();
        ComponentPageElement element = mockComponentPageElement();
        ComponentModel model = mockComponentModel();
        Page page = mockPage();

        expect(modelSource.getPageModel(pageName)).andReturn(model);

        expect(model.handlesEvent(EventConstants.PASSIVATE)).andReturn(true);
View Full Code Here

    @Test
    public void checkout_when_page_list_is_null()
    {
        PageLoader loader = mockPageLoader();
        Page page = mockPage();
        ThreadLocale tl = mockThreadLocale();
        Logger logger = mockLogger();

        train_getLocale(tl, locale);
View Full Code Here

    }

    @Test
    public void checkout_when_page_list_is_empty()
    {
        Page page1 = mockPage();
        Page page2 = mockPage();
        PageLoader loader = mockPageLoader();
        Logger logger = mockLogger();
        ThreadLocale tl = mockThreadLocale();

        train_getLocale(tl, locale);
View Full Code Here

    @Test
    public void dirty_pages_are_not_pooled()
    {
        PageLoader loader = mockPageLoader();
        Page page = mockPage();
        Logger logger = mockLogger();

        train_detached(page, true);
        train_getName(page, "dirty");
        train_getLocale(page, Locale.ENGLISH);
View Full Code Here

        this.environment = environment;
    }

    public void handle(ComponentEventRequestParameters parameters) throws IOException
    {
        Page activePage = cache.get(parameters.getActivePageName());

        ComponentResultProcessorWrapper callback = new ComponentResultProcessorWrapper(resultProcessor);

        // If activating the page returns a "navigational result", then don't trigger the action
        // on the component.

        activePage.getRootElement().triggerContextEvent(EventConstants.ACTIVATE,
                                                        parameters.getPageActivationContext(), callback);

        if (callback.isAborted()) return;

        Page containerPage = cache.get(parameters.getContainingPageName());

        ComponentPageElement element = containerPage.getComponentElementByNestedId(parameters.getNestedComponentId());

        environment.push(ComponentEventResultProcessor.class, resultProcessor);

        boolean handled = element.triggerContextEvent(parameters.getEventType(), parameters.getEventContext(),
                                                      callback);
View Full Code Here

    public void page_activation_context_for_root_index_page() throws Exception
    {
        ComponentClassResolver resolver = mockComponentClassResolver();
        Request request = mockRequest();
        Response response = mockResponse();
        Page page = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        PageResponseRenderer renderer = mockPageResponseRenderer();
        RequestPageCache cache = mockRequestPageCache();
        ComponentEventResultProcessor processor = newComponentEventResultProcessor();
        LocalizationSetter ls = mockLocalizationSetter();
View Full Code Here

        PageResponseRenderer renderer = mockPageResponseRenderer();
        RequestPageCache cache = mockRequestPageCache();
        ComponentEventResultProcessor processor = newComponentEventResultProcessor();
        Request request = mockRequest();
        Response response = mockResponse();
        Page page = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        LocalizationSetter ls = mockLocalizationSetter();

        String path = "/foo/Bar" + (finalSlash ? "/" : "");
        train_getPath(request, path);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.internal.structure.Page$Stats

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.