Package org.apache.tapestry5.internal.structure

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


        return tracker.invoke("Constructing instance of page class " + pageClassName, new Invokable<Page>()
        {
            public Page invoke()
            {
                Page page = new PageImpl(logicalPageName, selector, persistentFieldManager, perThreadManager);

                ComponentAssembler assembler = getAssembler(pageClassName, selector);

                ComponentPageElement rootElement = assembler.assembleRootComponent(page);

                page.setRootElement(rootElement);

                // The page is *loaded* before it is attached to the request.
                // This is to help ensure that no client-specific information leaks
                // into the page's default state.

                page.loaded();

                return page;
            }
        });
    }
View Full Code Here


    @Test
    public void root_element_of_page()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_get(cache, PAGE_NAME, page);
View Full Code Here

    @Test
    public void nested_element_within_page()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        ComponentPageElement element = mockComponentPageElement();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_get(cache, PAGE_NAME, page);
View Full Code Here

    @Test
    public void get_page_by_logical_name()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_get(cache, PAGE_NAME, page);
        train_getRootComponent(page, component);
View Full Code Here

    @Test
    public void get_page_by_class()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_resolvePageClassNameToPageName(resolver, ComponentSourceImplTest.class.getName(), PAGE_NAME);
View Full Code Here

    @Test
    public void get_active_page()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();
        RequestGlobals globals = mockRequestGlobals();
        String pageName = "Active";
View Full Code Here

    {
        Component c = (Component) component;

        String pageName = c.getComponentResources().getPageName();

        Page page = pageCache.get(pageName);

        return pageContentAnalyzer.findContentType(page);
    }
View Full Code Here

        return pageContentAnalyzer.findContentType(page);
    }

    public void renderPageMarkupResponse(String pageName) throws IOException
    {
        Page page = pageCache.get(pageName);

        renderer.renderPageResponse(page);
    }
View Full Code Here

    public void loopback_request() throws Exception
    {
        RequestPageCache cache = mockRequestPageCache();
        ComponentEventResultProcessor processor = mockComponentEventResultProcessor();
        PageResponseRenderer renderer = mockPageResponseRenderer();
        Page page = mockPage();
        EventContext context = mockEventContext();
        ComponentPageElement root = mockComponentPageElement();
        InternalComponentResources pageResources = mockInternalComponentResources();
        PageActivator activator = newMock(PageActivator.class);
View Full Code Here

        // Otherwise, a component within a page. Components are transformed to implement RenderCommand, but if we just
        // pass the component itself to the master processor, we'll get in a loop, so we instead
        // pass the ComponentPageElement (which implements RenderCommand as well).

        Page page = cache.get(pageName);

        String nestedId = resources.getNestedId();

        RenderCommand command = page.getComponentElementByNestedId(nestedId);

        masterProcessor.processResultValue(command);
    }
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.