Package org.apache.tapestry5.runtime

Examples of org.apache.tapestry5.runtime.RenderCommand


        queue.push(command);
    }

    public void run(MarkupWriter writer)
    {
        RenderCommand command = null;

        boolean traceEnabled = logger.isTraceEnabled(TapestryMarkers.RENDER_COMMANDS);

        long startNanos = System.nanoTime();
        int commandCount = 0;
        int maxDepth = 0;

        // Seems to make sense to use one try/finally around the whole process, rather than
        // around each call to render() since the end result (in a failure scenario) is the same.

        try
        {
            while (!queue.isEmpty())
            {
                maxDepth = Math.max(maxDepth, queue.getDepth());

                command = queue.pop();

                commandCount++;

                if (traceEnabled) logger.trace(TapestryMarkers.RENDER_COMMANDS, "Executing: {}", command);

                command.render(writer, this);
            }
        }
        catch (RuntimeException ex)
        {
            // This will likely leave the page in a dirty state, and it will not go back into the
View Full Code Here


    public AjaxResponseRenderer addRender(String clientId, Object renderer)
    {
        assert InternalUtils.isNonBlank(clientId);
        assert renderer != null;

        RenderCommand command = typeCoercer.coerce(renderer, RenderCommand.class);

        addFilter(new SingleZonePartialRendererFilter(clientId, command, queue, ajaxFormUpdateController));

        return this;
    }
View Full Code Here

        add(configuration, 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

            // The AjaxResponseRenderer will convert the object to a RenderCommand, but does nothing special if there's a failure
            // (because the stack trace will clearly identify what's going on). We do the conversion here so that we can relate
            // a failure to a zone id. It will just be a pass-thru on the second type coercion.

            RenderCommand zoneRenderCommand = toRenderer(zoneId, provided);

            ajaxResponseRenderer.addRender(zoneId, zoneRenderCommand);
        }

        partialRenderer.renderPartialPageMarkup();
View Full Code Here

                pageAssembly.weight++;

                InternalComponentResources resources = pageAssembly.activeElement.peek().getComponentResources();

                RenderCommand command = elementFactory.newAttributeElement(resources, token);

                pageAssembly.addRenderCommand(command);
            }
        });
    }
View Full Code Here

        {
            public void execute(PageAssembly pageAssembly)
            {
                ComponentResources resources = pageAssembly.activeElement.peek().getComponentResources();

                RenderCommand command = elementFactory.newExpansionElement(resources, token);

                pageAssembly.addRenderCommand(command);
            }
        });
    }
View Full Code Here

        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

        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 RenderCommand newAttributeElement(ComponentResources componentResources, final AttributeToken token)
    {
        final StringProvider provider = parseAttributeExpansionExpression(token.value, componentResources,
                token.getLocation());

        return new RenderCommand()
        {
            public void render(MarkupWriter writer, RenderQueue queue)
            {
                writer.attributeNS(token.namespaceURI, token.name, provider.provideString());
            }
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

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.