Package org.apache.tapestry5.model

Examples of org.apache.tapestry5.model.MutableComponentModel


        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

        model.addEmbeddedComponent("fred", "Fred1", COMPONENT_CLASS_NAME, false, null);

        try
        {
            model.addEmbeddedComponent("fred", "Fred2", COMPONENT_CLASS_NAME, false, null);
            unreachable();
        } catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
                    "Embedded component 'fred' has already been defined for component class org.example.components.Foo.");
View Full Code Here


        Logger logger = mockLogger();
        Location l = mockLocation();

        replay();

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

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

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

        assertTrue(fred.getInheritInformalParameters());

        assertEquals(fred.toString(),
                "EmbeddedComponentModel[id=fred type=Fred class=org.example.components.Fred inheritInformals=true]");
View Full Code Here

        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

        model.addEmbeddedComponent("fred", "Fred1", COMPONENT_CLASS_NAME, false, null);

        try
        {
            model.addEmbeddedComponent("FRED", "Fred2", COMPONENT_CLASS_NAME, false, null);
            unreachable();
        } catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
                    "Embedded component 'FRED' has already been defined for component class org.example.components.Foo.");
View Full Code Here

        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

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

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

        fred.addParameter("city", "bedrock");
View Full Code Here

        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

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

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

        try
View Full Code Here

        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

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

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

        verify();
View Full Code Here

        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

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

        fred.addMixin("zip.zop.Zoom");
        fred.addMixin("foo.bar.Baz");
View Full Code Here

        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

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

        fred.addMixin("zip.zop.Zoom", "before:*", "after:foo.bar.Baz");
        fred.addMixin("foo.bar.Baz");

View Full Code Here

        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

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

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

        try
View Full Code Here

        Resource r = mockResource();
        Logger logger = mockLogger();

        replay();

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

        assertTrue(model.getPersistentFieldNames().isEmpty());

        verify();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.model.MutableComponentModel

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.