Package org.apache.velocity.tools.view

Examples of org.apache.velocity.tools.view.VelocityView



    protected void initializeView()
    {
        // get the VelocityView for this app
        VelocityView view =
            ServletUtils.getVelocityView(this.pageContext.getServletConfig());

        // now make a Context
        ViewToolContext context =
            new JspToolContext(view.getVelocityEngine(), this.pageContext);

        view.prepareContext(context, (HttpServletRequest)this.pageContext.getRequest());

        setVelocityView(view);
        setViewToolContext(context);
    }
View Full Code Here


    protected void renderContent(Writer out) throws Exception
    {
        if (getTemplate() != null)
        {
            VelocityView view = getVelocityView();
            ViewToolContext context = getViewToolContext();

            // get the actual Template
            Template template = view.getTemplate(getTemplate());

            if (getBodyContent() != null)
            {
                context.put(getBodyContentKey(), getRenderedBody());
            }
View Full Code Here

TOP

Related Classes of org.apache.velocity.tools.view.VelocityView

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.