Package org.apache.tapestry.model

Examples of org.apache.tapestry.model.MutableEmbeddedComponentModel


        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);

        assertTrue(model.getEmbeddedComponentIds().isEmpty());

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                l);

        assertEquals(fred.getId(), "fred");
        assertEquals(fred.getComponentType(), "Fred");
        assertSame(fred.getLocation(), l);

        MutableEmbeddedComponentModel barney = model.addEmbeddedComponent(
                "barney",
                "Barney",
                COMPONENT_CLASS_NAME,
                null);
View Full Code Here


        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        assertTrue(fred.getParameterNames().isEmpty());

        fred.addParameter("city", "bedrock");
        fred.addParameter("job", "crane operator");

        assertEquals(fred.getParameterNames(), Arrays.asList("city", "job"));

        assertEquals(fred.getParameterValue("city"), "bedrock");

        verify();
    }
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        fred.addParameter("city", "bedrock");

        try
        {
            fred.addParameter("city", "slateville");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        assertTrue(fred.getMixinClassNames().isEmpty());

        verify();
    }
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        fred.addMixin("zip.zop.Zoom");
        fred.addMixin("foo.bar.Baz");

        assertEquals(fred.getMixinClassNames(), Arrays.asList("zip.zop.Zoom", "foo.bar.Baz"));

        verify();
    }
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        fred.addMixin("zip.zop.Zoom");

        try
        {
            fred.addMixin("zip.zop.Zoom");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(
                    ex.getMessage(),
                    "Mixin zip.zop.Zoom (for component fred) has already been defined.");
        }

        // Make sure it wasn't actually added.

        assertEquals(fred.getMixinClassNames(), Arrays.asList("zip.zop.Zoom"));

        verify();
    }
View Full Code Here

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null);

        assertTrue(model.getEmbeddedComponentIds().isEmpty());

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                l);

        assertEquals(fred.getId(), "fred");
        assertEquals(fred.getComponentType(), "Fred");
        assertSame(fred.getLocation(), l);

        MutableEmbeddedComponentModel barney = model.addEmbeddedComponent(
                "barney",
                "Barney",
                COMPONENT_CLASS_NAME,
                null);
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        assertTrue(fred.getParameterNames().isEmpty());

        fred.addParameter("city", "bedrock");
        fred.addParameter("job", "crane operator");

        assertEquals(fred.getParameterNames(), Arrays.asList("city", "job"));

        assertEquals(fred.getParameterValue("city"), "bedrock");

        verify();
    }
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        fred.addParameter("city", "bedrock");

        try
        {
            fred.addParameter("city", "slateville");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null);

        MutableEmbeddedComponentModel fred = model.addEmbeddedComponent(
                "fred",
                "Fred",
                COMPONENT_CLASS_NAME,
                null);

        assertTrue(fred.getMixinClassNames().isEmpty());

        verify();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.model.MutableEmbeddedComponentModel

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.