Examples of IContainedComponent


Examples of org.apache.tapestry.spec.IContainedComponent

    public void testListenerBinding() throws Exception
    {
        IComponentSpecification spec = parsePage("ListenerBinding.page");

        checkLine(spec, 22);
        IContainedComponent c = spec.getComponent("c");

        checkLine(c, 24);

        IListenerBindingSpecification lbs = (ListenerBindingSpecification) c.getBinding("listener");

        checkLine(lbs, 25);

        String expectedScript = buildExpectedScript(new String[]
        { "if page.isFormInputValid():", "  cycle.page = \"Results\"", "else:",
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

    public void testInheritInformalParameters() throws Exception
    {
        IComponentSpecification spec = parseComponent("TestInheritInformal.jwc");

        IContainedComponent border = spec.getComponent("border");
        assertEquals(border.getInheritInformalParameters(), false);

        IContainedComponent textField = spec.getComponent("textField");
        assertEquals(textField.getInheritInformalParameters(), true);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

    public void testComponentProperty() throws Exception
    {
        IComponentSpecification cs = parseComponent("ComponentProperty.jwc");

        IContainedComponent cc = cs.getComponent("body");

        assertEquals("my-value", cc.getProperty("my-property"));
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

    public void testComponentInjectProperty() throws Exception
    {
        IComponentSpecification cs = parseComponent("ComponentInjectProperty.jwc");

        IContainedComponent cc = cs.getComponent("body");

        assertEquals("myProperty", cc.getPropertyName());

        cc = cs.getComponent("fred");

        assertNull(cc.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

    public void testComponentCopyOf() throws Exception
    {
        IComponentSpecification cs = parseComponent("ComponentCopyOf.jwc");

        IContainedComponent source = cs.getComponent("source");
        IContainedComponent copy = cs.getComponent("copy");
        IContainedComponent override = cs.getComponent("override");

        assertEquals("Insert", source.getType());
        assertEquals("Insert", copy.getType());
        assertEquals("Insert", override.getType());

        IBindingSpecification b = source.getBinding("value");

        assertEquals(BindingType.PREFIXED, b.getType());
        assertEquals("ognl:date", b.getValue());

        assertSame(b, copy.getBinding("value"));

        IBindingSpecification b2 = override.getBinding("value");
        assertEquals("ognl:tomorrow", b2.getValue());

        b = copy.getBinding("foo");

        assertSame(b, override.getBinding("foo"));

        b = copy.getBinding("formatter");

        assertSame(b, override.getBinding("formatter"));
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

    }

    public void testComponentProperty() throws Exception
    {
        IComponentSpecification s = parseComponent("ComponentProperty.jwc");
        IContainedComponent c = s.getComponent("barney");

        checkList("propertyNames", new String[]
        { "apple", "chocolate", "frozen" }, c.getPropertyNames());

        checkProperty(c, "apple", "pie");
        checkProperty(c, "chocolate", "cake");
        checkProperty(c, "frozen", "yogurt");
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

    public void test_Simple()
    {
        Location l = newLocation();

        IContainedComponent cc = run("textField", "getTextField", l);

        assertEquals("TextField", cc.getType());
        assertEquals(false, cc.getInheritInformalParameters());
        assertEquals(null, cc.getCopyOf());
        assertSame(l, cc.getLocation());
        assertEquals(true, cc.getBindingNames().isEmpty());
        assertEquals("textField", cc.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

        assertEquals("textField", cc.getPropertyName());
    }
   
    public void test_Without_Type()
    {
        IContainedComponent cc = run("usernameField", "getUsernameField", null);
       
        assertEquals("TextField", cc.getType());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

        assertEquals("TextField", cc.getType());
    }

    public void test_Explicit_Id()
    {
        IContainedComponent cc = run("email", "getEmailField", null);

        assertEquals("emailField", cc.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IContainedComponent

        assertEquals("emailField", cc.getPropertyName());
    }

    public void test_Inherit_Informal_Parameters()
    {
        IContainedComponent cc = run("inherit", "getInherit", null);

        assertEquals(true, cc.getInheritInformalParameters());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.