Package org.apache.tapestry.dom

Examples of org.apache.tapestry.dom.Element


    {
        String appPackage = "org.apache.tapestry.integration.app2";
        String appName = "";
        _tester = new PageTester(appPackage, appName);
        Document doc = _tester.renderPage("TestPageForActionLink");
        Element link = doc.getElementById("link1");
        doc = _tester.clickLink(link);
        assertTrue(doc.toString().contains("You chose: 123"));
    }
View Full Code Here


        _linkFixture.writeLink(writer, "fred", link);

        verify();

        Element e = writer.getElement();

        writer.write("link text");
        writer.end();

        assertEquals(writer.toString(), "<a href=\"/foo/bar.baz\" id=\"fred\">link text</a>");
View Full Code Here

        _linkFixture.writeLink(writer, "barney", link);

        verify();

        Element e = writer.getElement();

        writer.write("link text");
        writer.end();

        assertEquals(writer.toString(), "<a href=\"/foo/bar.baz#wilma\" id=\"barney\">link text</a>");
View Full Code Here

        train_peekRequired(env, ValidationTracker.class, tracker);
        train_inError(tracker, field, true);

        replay();

        Element e = writer.element("label", "accesskey", "f");

        ValidationDecorator decorator = new DefaultValidationDecorator(env, null, null);

        decorator.insideLabel(field, e);
View Full Code Here

        train_peekRequired(env, ValidationTracker.class, tracker);
        train_inError(tracker, field, true);

        replay();

        Element e = writer.element("label", "accesskey", "f", "class", "foo");

        ValidationDecorator decorator = new DefaultValidationDecorator(env, null, null);

        decorator.insideLabel(field, e);
View Full Code Here

    {
        String appPackage = "org.apache.tapestry.integration.app2";
        String appName = "";
        _tester = new PageTester(appPackage, appName);
        Document doc = _tester.renderPage("TestPageForActionLink");
        Element link = doc.getElementById("link1");
        doc = _tester.clickLink(link);
        assertTrue(doc.toString().contains("You chose: 123"));
    }
View Full Code Here

    {
        String appPackage = "org.apache.tapestry.integration.app2";
        String appName = "";
        _tester = new PageTester(appPackage, appName);
        Document doc = _tester.renderPage("TestPageForForm");
        Element form = doc.getElementById("form1");
        Map<String, String> fieldValues = CollectionFactory.newMap();
        fieldValues.put("t1", "hello");
        doc = _tester.submitForm(form, fieldValues);
        assertTrue(doc.toString().contains("You entered: hello"));
    }
View Full Code Here

    private Map<String, String> _fieldValues;

    @Test
    public void submit_form()
    {
        Element submitButton = _doc.getElementById("capitalize1");
        _fieldValues.put("t1", "hello");
        _doc = _tester.clickSubmit(submitButton, _fieldValues);
        assertTrue(_doc.toString().contains("Value is: HELLO"));
    }
View Full Code Here

    }

    @Test
    public void access_following_fields()
    {
        Element submitButton = _doc.getElementById("capitalize2");
        _fieldValues.put("t2", "world");
        _doc = _tester.clickSubmit(submitButton, _fieldValues);
        assertTrue(_doc.toString().contains("Value is: WORLD"));
    }
View Full Code Here

    }

    @Test(expectedExceptions = IllegalArgumentException.class)
    public void not_a_submit()
    {
        Element submitButton = _doc.getElementById("t1");
        _tester.clickSubmit(submitButton, _fieldValues);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.dom.Element

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.