Package org.apache.tapestry5.internal

Examples of org.apache.tapestry5.internal.InternalComponentResources


    }

    @Test
    public void inject_field() throws Exception
    {
        InternalComponentResources resources = mockInternalComponentResources();

        Logger logger = mockLogger();
        MutableComponentModel model = mockMutableComponentModel(logger);

        replay();
View Full Code Here


     * write substitions.
     */
    @Test
    public void override_field_read_and_write() throws Exception
    {
        InternalComponentResources resources = mockInternalComponentResources();

        Logger logger = mockLogger();
        MutableComponentModel model = mockMutableComponentModel(logger);

        replay();
View Full Code Here

        ComponentEventResultProcessor processor = mockComponentEventResultProcessor();
        PageResponseRenderer renderer = mockPageResponseRenderer();
        Page page = mockPage();
        EventContext context = mockEventContext();
        ComponentPageElement root = mockComponentPageElement();
        InternalComponentResources pageResources = mockInternalComponentResources();
        PageActivator activator = newMock(PageActivator.class);

        train_get(cache, "foo/Bar", page);

        train_getRootElement(page, root);
View Full Code Here

        return createComponent(classname);
    }

    private Component createComponent(String classname)
    {
        InternalComponentResources resources = mockInternalComponentResources();

        replay();

        Instantiator inst = source.getInstantiator(classname);
View Full Code Here

        train_getModel(ins, model);

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(null, element, null,
                elementResources, null, null, ins, false);

        resources.renderInformalParameters(writer);

        verify();
    }
View Full Code Here

        train_getParameterModel(model, "fred", pmodel);

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(null, element, null,
                elementResources, null, null, ins, false);

        resources.bindParameter("fred", binding);

        resources.renderInformalParameters(writer);

        verify();
    }
View Full Code Here

        writer.attributes("fred", "97");

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(null, element, null,
                elementResources, "Foo.bar", null, ins, false);

        resources.bindParameter("fred", binding);

        resources.renderInformalParameters(writer);

        verify();
    }
View Full Code Here

        train_isRendering(element, true);
        train_isRendering(element, true);

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(null, element, null,
                elementResources, "Foo.bar", null, ins, false);

        resources.storeRenderVariable("fred", "FRED");
        resources.storeRenderVariable("barney", "BARNEY");

        resources.postRenderCleanup();

        try
        {
            resources.getRenderVariable("fred");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

        train_isRendering(element, false);

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(null, element, null, null, "Foo.bar",
                null, ins, false);

        try
        {
            resources.storeRenderVariable("fred", "FRED");
            unreachable();
        }
        catch (IllegalStateException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

        page.addLifecycleListener(listener);

        replay();

        InternalComponentResources resources = new InternalComponentResourcesImpl(page, element, null, null, null,
                null, ins, false);

        resources.addPageLifecycleListener(listener);

        verify();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.internal.InternalComponentResources

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.