Package org.jpublish

Examples of org.jpublish.Page


            if (writer == null)
                throw new GeneralException("Cannot load dynamic content with a null Writer");

            // load the page         
            PageInstance pageInstance = siteContext.getPageManager().getPage(path);
            Page page = new Page(pageInstance);

            context.disableCheckReservedNames(this);

            // expose the page in the context
            context.put("page", page);

            // expose components in the context
            context.put("components", new ComponentMap(context));

            if (siteContext.isProtectReservedNames()) {
                context.enableCheckReservedNames(this);
            }

            // execute the global actions
            if (executeGlobalActions(request, response, context, path, allowRedirect))
                return;

            // execute path actions
            if (executePathActions(request, response, context, path, allowRedirect))
                return;

            // execute parameter actions
            if (executeParameterActions(request, response, context, path, allowRedirect))
                return;

            // execute the page actions          
            if (optionalRedirect(page.executeActions(context), path, response, allowRedirect))
                return;

            // get the template
            Template template = siteContext.getTemplateManager().getTemplate(page.getFullTemplateName());
          
            // merge the template          
            template.merge(context, page, writer);
            writer.flush();           
        } catch (FileNotFoundException e) {
View Full Code Here

TOP

Related Classes of org.jpublish.Page

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.