Package org.apache.tapestry5.runtime

Examples of org.apache.tapestry5.runtime.RenderCommand


        configuration.add(CoercionTuple.create(Renderable.class, RenderCommand.class,
                new Coercion<Renderable, RenderCommand>()
                {
                    public RenderCommand coerce(final Renderable input)
                    {
                        return new RenderCommand()
                        {
                            public void render(MarkupWriter writer, RenderQueue queue)
                            {
                                input.render(writer);
                            }
View Full Code Here


public class RenderQueueImplTest extends InternalBaseTestCase
{
    @Test
    public void run_commands()
    {
        final RenderCommand command2 = newMock(RenderCommand.class);
        RenderCommand command1 = new RenderCommand()
        {
            public void render(MarkupWriter writer, RenderQueue queue)
            {
                queue.push(command2);
            }
View Full Code Here

        ComponentResources bar = mockInternalComponentResources();
        ComponentResources baz = mockInternalComponentResources();

        final RuntimeException t = new RuntimeException("Oops.");

        RenderCommand rc = new RenderCommand()
        {

            public void render(MarkupWriter writer, RenderQueue queue)
            {
                throw t;
View Full Code Here

        if (!callback.isAborted()) return;

        // Here's where it gets very, very tricky.

        final RenderCommand rootRenderCommand = pageRenderQueue.getRootRenderCommand();

        final String formId = request.getParameter(FORMID_PARAMETER);

        if (InternalUtils.isBlank(formId))
            throw new RuntimeException(String.format(
View Full Code Here

public class CompositeRenderCommandTest extends InternalBaseTestCase
{
    @DataProvider(name = "nyi")
    public Object[][] nyi_data()
    {
        RenderCommand push = new RenderCommand()
        {
            public void render(MarkupWriter writer, RenderQueue queue)
            {
                queue.push(null);
            }
        };

        RenderCommand startComponent = new RenderCommand()
        {
            public void render(MarkupWriter writer, RenderQueue queue)
            {
                queue.startComponent(null);
            }
        };

        RenderCommand endComponent = new RenderCommand()
        {
            public void render(MarkupWriter writer, RenderQueue queue)
            {
                queue.endComponent();
            }
View Full Code Here

        replay();

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

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

        writer.element("root");

        element.render(writer, queue);

        verify();

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

     *            if true, add "t-last" attribute to the LI element
     * @return command to render the node
     */
    private RenderCommand toRenderCommand(final TreeNode node, final boolean isLast)
    {
        return new RenderCommand()
        {
            public void render(MarkupWriter writer, RenderQueue queue)
            {
                // Inform the component's container about what value is being rendered
                // (this may be necessary to generate the correct label for the node).
View Full Code Here

        {
            public RenderCommand createRenderCommand(final DynamicDelegate delegate)
            {
                final Mapper<DynamicTemplateElement, RenderCommand> toRenderCommand = createToRenderCommandMapper(delegate);

                return new RenderCommand()
                {
                    public void render(MarkupWriter writer, RenderQueue queue)
                    {
                        Worker<RenderCommand> pushOnQueue = createQueueRenderCommand(queue);
View Full Code Here

        };
    }

    private static RenderCommand toRenderCommand(final DynamicTemplateElement value, final DynamicDelegate delegate)
    {
        return new RenderCommand()
        {
            public void render(MarkupWriter writer, RenderQueue queue)
            {
                value.render(writer, queue, delegate);
            }
View Full Code Here

        if (!handled.contains(BeforeRenderTemplate.class))
            beforeRenderTemplatePhase = new RenderTemplatePhase();

        if (!handled.contains(BeginRender.class))
        {
            RenderCommand replacement = afterRenderPhase != null ? new OptimizedBeginRenderPhase()
                    : beforeRenderTemplatePhase;

            beginRenderPhase = replacement;
        }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.runtime.RenderCommand

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.