Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.ComponentSpecification


public class TestPersistAnnotationWorker extends TestAnnotationEnhancementWorker
{
    public void testInject()
    {
        EnhancementOperation op = newOp();
        IComponentSpecification spec = new ComponentSpecification();

        replayControls();

        Method m = findMethod(AnnotatedPage.class, "getClientPersistentProperty");

        new PersistAnnotationWorker().performEnhancement(op, spec, m);

        verifyControls();

        IPropertySpecification ps = spec.getPropertySpecification("clientPersistentProperty");

        assertEquals("client", ps.getPersistence());
        assertEquals("clientPersistentProperty", ps.getName());
    }
View Full Code Here


            __CLOVER_247_0.S[6645]++;_log.debug("Found HTML template at " + resource);}

        // TODO The SpecFactory in Specification parser should be used in some way to
        // create an IComponentSpecification!

        __CLOVER_247_0.S[6646]++;IComponentSpecification specification = new ComponentSpecification();
        __CLOVER_247_0.S[6647]++;specification.setPageSpecification(true);
        __CLOVER_247_0.S[6648]++;specification.setSpecificationLocation(resource);

        __CLOVER_247_0.S[6649]++;setSpecification(specification);

        __CLOVER_247_0.S[6650]++;install();
    } finally { }}
View Full Code Here

        // namespace (typically, the application specification). This will be used when
        // searching for the page's message catalog or other related assets.

        Resource pageResource = namespaceLocation.getRelativeResource(_simpleName + ".page");

        IComponentSpecification specification = new ComponentSpecification();
        specification.setPageSpecification(true);
        specification.setSpecificationLocation(pageResource);
        specification.setLocation(new LocationImpl(resource));

        setSpecification(specification);

        install();
    }
View Full Code Here

    public void testRenderInformalParameters()
    {
        Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
        { "name", "assignedName", "value", Boolean.TRUE, "specification",
                new ComponentSpecification() });

        IMarkupWriter writer = newBufferWriter();
        IRequestCycle cycle = newCycle();

        IBinding binding = newBinding("informal-value");
View Full Code Here

        MockDelegate delegate = new MockDelegate();

        IBinding binding = newBinding("informal-value");

        TextField component = (TextField) newInstance(TextField.class, new Object[]
        { "name", "fred", "translatedFieldSupport", tfs, "validatableFieldSupport", vfs, "value", new Integer(10), "specification", new ComponentSpecification() });

        component.setBinding("informal", binding);

        trainGetForm(cyclec, cycle, form);
        trainWasPrerendered(formc, form, writer, component, false);
View Full Code Here

    public void testRenderInformalParameters()
    {
        Checkbox cb = (Checkbox) newInstance(Checkbox.class, new Object[]
        { "name", "assignedName", "value", Boolean.TRUE, "specification",
                new ComponentSpecification() });

        IMarkupWriter writer = newBufferWriter();
        IRequestCycle cycle = newCycle();

        IBinding binding = newBinding("informal-value");
View Full Code Here

        MockDelegate delegate = new MockDelegate();

        IBinding binding = newBinding("informal-value");

        TextArea component = (TextArea) newInstance(TextArea.class, new Object[]
        { "name", "fred", "translatedFieldSupport", tfs, "validatableFieldSupport", vfs, "value", " text area value ", "specification", new ComponentSpecification() });

        component.setBinding("informal", binding);

        trainGetForm(cycle, form);
        trainWasPrerendered(form, writer, component, false);
View Full Code Here

    {
        if (inputClass.isInterface() || inputClass.isPrimitive() || inputClass.isArray())
            throw new IllegalArgumentException(ScriptMessages.wrongTypeForEnhancement(inputClass));

        EnhancementOperationImpl op = new EnhancementOperationImpl(_classResolver,
                new ComponentSpecification(), inputClass, _classFactory, null);

        IComponentSpecification spec = new ComponentSpecification();
        spec.setLocation(new CreatorLocation());

        Iterator i = _workers.iterator();
        while (i.hasNext())
        {
            EnhancementWorker worker = (EnhancementWorker) i.next();
View Full Code Here

    private IComponentSpecification newSpec(String path)
    {
        Resource resource = new ClasspathResource(new DefaultClassResolver(), path);

        IComponentSpecification spec = new ComponentSpecification();
        spec.setSpecificationLocation(resource);

        return spec;
    }
View Full Code Here

        MockDelegate delegate = new MockDelegate();

        IBinding binding = newBinding("informal-value");

        TextField component = (TextField) newInstance(TextField.class, new Object[]
        { "name", "fred", "translatedFieldSupport", tfs, "validatableFieldSupport", vfs, "value", new Integer(10), "specification", new ComponentSpecification() });

        component.setBinding("informal", binding);

        trainGetForm(cycle, form);
        trainWasPrerendered(form, writer, component, false);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.spec.ComponentSpecification

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.