Package com.astamuse.asta4d.render

Examples of com.astamuse.asta4d.render.Renderer


        return Renderer.create("*", element);
    }

    // @ShowCode:showVariableinjectionEnd
    public Renderer setProfile() {
        Renderer render = new GoThroughRenderer();
        render.add("p#name span", "asta4d");
        render.add("p#age span", "20");
        return render;
    }
View Full Code Here


    }

    // @ShowCode:showSnippetEnd
    // @ShowCode:showVariableinjectionStart
    public Renderer setProfileByVariableInjection(String name, int age) {
        Renderer render = new GoThroughRenderer();
        render.add("p#name span", name);
        render.add("p#age span", age);
        return render;
    }
View Full Code Here

    }

    // @ShowCode:showVariableinjectionEnd
    // @ShowCode:showAttributevaluesStart
    public Renderer manipulateAttrValues() {
        Renderer render = new GoThroughRenderer();
        render.add("input#yes", "checked", "checked");
        render.add("button#delete", "disabled", null);
        render.add("li#plus", "+class", "red");
        render.add("li#minus", "-class", "bold");
        return render;
    }
View Full Code Here

        super(content);
    }

    @Override
    protected Element transform(Element elem, Renderable content) {
        Renderer render = content.render();
        RendererTransformer delegatedTransformer = new RendererTransformer(render);
        return delegatedTransformer.invoke(elem);
    }
View Full Code Here

                 * Commonly, it is not a problem, but it is difficult to debug since the original exception had been
                 * ignored and there is no any information about it at anywhere. So at least, we output the exception
                 * in log to help debug.
                 */
                try {
                    Renderer renderer = Context.with(context, caller);
                    return new FutureRendererHolder(renderDeclaration, snippetRef, renderer);
                } catch (Exception ex) {
                    Exception nex = new Exception("Error occured when execute rendering:[" + renderDeclaration + "]", ex);
                    logger.error("", nex);
                    throw nex;
View Full Code Here

            this.interceptor = interceptor;
        }

        @Override
        public boolean beforeProcess(Document doc) throws Exception {
            Renderer renderer = new GoThroughRenderer();
            interceptor.prePageRendering(renderer);
            RenderUtil.apply(doc, renderer);
            return true;
        }
View Full Code Here

        @Override
        public void afterProcess(Document doc, ExceptionHandler exceptionHandler) {
            if (exceptionHandler.getException() != null) {
                return;
            }
            Renderer renderer = new GoThroughRenderer();
            interceptor.postPageRendering(renderer);
            RenderUtil.apply(doc, renderer);
        }
View Full Code Here

        return Renderer.create("*", element);
    }

    // @ShowCode:showVariableinjectionEnd
    public Renderer setProfile() {
        Renderer render = new GoThroughRenderer();
        render.add("p#name span", "asta4d");
        render.add("p#age span", 20);
        return render;
    }
View Full Code Here

    // @ShowCode:showSnippetEnd

    // @ShowCode:showVariableinjectionStart
    public Renderer setProfileByVariableInjection(String name, int age) {
        Renderer render = new GoThroughRenderer();
        render.add("p#name span", name);
        render.add("p#age span", age);
        return render;
    }
View Full Code Here

    }

    // @ShowCode:showVariableinjectionEnd
    // @ShowCode:showAttributevaluesStart
    public Renderer manipulateAttrValues() {
        Renderer render = new GoThroughRenderer();
        render.add("input#yes", "checked", "checked");
        render.add("button#delete", "disabled", null);
        render.add("li#plus", "+class", "red");
        render.add("li#minus", "-class", "bold");
        return render;
    }
View Full Code Here

TOP

Related Classes of com.astamuse.asta4d.render.Renderer

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.