Package com.opensymphony.module.sitemesh

Examples of com.opensymphony.module.sitemesh.Factory


            int bodyNode = 1;
            if (node.jjtGetNumChildren() == 3)
                bodyNode = 2;
            node.jjtGetChild(bodyNode).render(adapter, bodyContent);

            Factory factory = PortletContext.getContext().getSiteMeshFactory();
            Decorator decorator = factory.getDecoratorMapper().getNamedDecorator(request, decoratorName);
            if (decorator != null) {
                com.opensymphony.module.sitemesh.PageParser parser = factory.getPageParser("text/html");
                HTMLPage page = (HTMLPage) ((FastPageParser) parser).parse(new StringReader(bodyContent.toString()));
                Context context = VelocityManager.getInstance()
                        .createContext(ActionContext.getContext().getValueStack(), request, response);
                context.put("page", page);
                if (node.jjtGetNumChildren() == 3)
View Full Code Here


    public void init(FilterConfig filterConfig) {
        this.filterConfig = filterConfig;
        super.init(filterConfig);
        ServletContext sc = filterConfig.getServletContext();
        Factory instance = (Factory) sc.getAttribute(SITEMESH_FACTORY);
        if (instance == null) {
            sc.setAttribute(SITEMESH_FACTORY, new StrutsSiteMeshFactory(new Config(filterConfig)));
        }
    }
View Full Code Here

            sc.setAttribute(SITEMESH_FACTORY, new StrutsSiteMeshFactory(new Config(filterConfig)));
        }
    }

    protected DecoratorSelector initDecoratorSelector(SiteMeshWebAppContext webAppContext) {
        Factory factory = Factory.getInstance(new Config(filterConfig));
        factory.refresh();
        return new FreemarkerMapper2DecoratorSelector(factory.getDecoratorMapper());
    }
View Full Code Here

        super.init(filterConfig);
     }

    protected DecoratorSelector initDecoratorSelector(SiteMeshWebAppContext webAppContext) {
        // TODO: Remove heavy coupling on horrible SM2 Factory
        Factory factory = Factory.getInstance(new Config(filterConfig));
        factory.refresh();
        return new FreemarkerMapper2DecoratorSelector(factory.getDecoratorMapper());
    }
View Full Code Here

    }
   
    public void init() {
        if(servletContext == null) return;

        Factory sitemeshFactory = (Factory)servletContext.getAttribute(FACTORY_SERVLET_CONTEXT_ATTRIBUTE);
        if(sitemeshFactory==null) {
            sitemeshFactory = loadSitemeshConfig();
        }
        contentProcessor = new PageParser2ContentProcessor(sitemeshFactory);
    }
View Full Code Here

    private FactoryHolder() {
        // static only
    }

    public static Factory getFactory() {
        Factory factory = holder.get();
        return factory;
    }
View Full Code Here

         this.filterConfig = filterConfig;
        super.init(filterConfig);
     }

    protected DecoratorSelector initDecoratorSelector(SiteMeshWebAppContext webAppContext) {
        Factory factory = Factory.getInstance(new Config(filterConfig));
        factory.refresh();
        return new FreemarkerMapper2DecoratorSelector(factory.getDecoratorMapper());
    }
View Full Code Here

    public void init(FilterConfig filterConfig) {
        this.filterConfig = filterConfig;
        super.init(filterConfig);
        ServletContext sc = filterConfig.getServletContext();
        Factory instance = (Factory) sc.getAttribute(SITEMESH_FACTORY);
        if (instance == null) {
            sc.setAttribute(SITEMESH_FACTORY, new StrutsSiteMeshFactory(new Config(filterConfig)));
        }
    }
View Full Code Here

            sc.setAttribute(SITEMESH_FACTORY, new StrutsSiteMeshFactory(new Config(filterConfig)));
        }
    }

    protected DecoratorSelector initDecoratorSelector(SiteMeshWebAppContext webAppContext) {
        Factory factory = Factory.getInstance(new Config(filterConfig));
        factory.refresh();
        return new FreemarkerMapper2DecoratorSelector(factory.getDecoratorMapper());
    }
View Full Code Here

        super.init(filterConfig);
     }

    protected DecoratorSelector initDecoratorSelector(SiteMeshWebAppContext webAppContext) {
        // TODO: Remove heavy coupling on horrible SM2 Factory
        Factory factory = Factory.getInstance(new Config(filterConfig));
        factory.refresh();
        return new FreemarkerMapper2DecoratorSelector(factory.getDecoratorMapper());
    }
View Full Code Here

TOP

Related Classes of com.opensymphony.module.sitemesh.Factory

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.