Package org.apache.tapestry.internal.structure

Examples of org.apache.tapestry.internal.structure.PageElement


        // text or comment content "inside" the BODY.
    }

    private void comment(CommentToken token)
    {
        PageElement commentElement = _pageElementFactory.newCommentElement(token);

        addToBody(commentElement);
    }
View Full Code Here


        boolean discard = _discardEndTagStack.pop();

        if (!discard)
        {
            PageElement element = _pageElementFactory.newEndElement();

            addToBody(element);
        }

        Runnable command = _endElementCommandStack.pop();
View Full Code Here

        command.run();
    }

    private void expansion(ExpansionToken token)
    {
        PageElement element = _pageElementFactory.newExpansionElement(_loadingElement
                .getComponentResources(), token);

        addToBody(element);
    }
View Full Code Here

        configureEnd(true, cleanup);
    }

    private void startElement(StartElementToken token)
    {
        PageElement element = _pageElementFactory.newStartElement(token);

        addToBody(element);

        // Controls how attributes are interpretted.
        _addAttributesAsComponentBindings = false;
View Full Code Here

        configureEnd(false, NO_OP);
    }

    private void text(TextToken token)
    {
        PageElement element = _pageElementFactory.newTextElement(token);

        addToBody(element);
    }
View Full Code Here

    private void dtd(DTDToken token)
    {
        // first DTD encountered wins.
        if (_dtdAdded) return;

        PageElement element = _pageElementFactory.newDTDElement(token);
        // since rendering via the markup writer is to the document tree,
        // we don't really care where this gets placed in the tree; the
        // DTDPageElement will set the dtd of the document directly, rather than
        // writing anything to the markup writer
        _page.getRootElement().addToTemplate(element);
View Full Code Here

        replay();

        PageElementFactory factory = new PageElementFactoryImpl(source, resolver, null, null, null);
        StartElementToken token = new StartElementToken("fred", l);

        PageElement element = factory.newStartElement(token);

        element.render(writer, queue);

        verify();

        assertEquals(element.toString(), "Start[fred]");
        assertEquals(writer.toString(), "<fred></fred>");
    }
View Full Code Here

        replay();

        PageElementFactory factory = new PageElementFactoryImpl(source, resolver, null, null, null);
        AttributeToken token = new AttributeToken("name", "value", l);

        PageElement element = factory.newAttributeElement(null, token);

        writer.element("root");

        element.render(writer, queue);

        verify();

        assertEquals(writer.toString(), "<root name=\"value\"/>");
    }
View Full Code Here

        replay();

        PageElementFactory factory = new PageElementFactoryImpl(source, resolver, null, null, null);

        PageElement element = factory.newEndElement();

        writer.element("root");
        writer.write("before");
        writer.element("nested");

        element.render(writer, queue);

        writer.write("after");

        verify();

        assertEquals(element.toString(), "End");
        assertEquals(writer.toString(), "<root>before<nested/>after</root>");
    }
View Full Code Here

        replay();

        PageElementFactory factory = new PageElementFactoryImpl(source, resolver, null, null, null);

        PageElement element1 = factory.newEndElement();
        PageElement element2 = factory.newEndElement();

        assertSame(element2, element1);

        verify();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.internal.structure.PageElement

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.