parent
d72d054efa
commit
6c9279590d
|
|
@ -18,6 +18,15 @@
|
|||
*/
|
||||
/**
|
||||
* Integration of the LibreCCM theme system with the Facelet ViewEngine of
|
||||
* Eclipse Krazo.
|
||||
* Eclipse Krazo. The integration allows it to load Facelets either from
|
||||
* a theme using a {@link Themes} or from the default locations. To enable the
|
||||
* integration the following snippet has to be added to the
|
||||
* {@code faces-config.xml}:
|
||||
* <pre>
|
||||
* <application>
|
||||
* &tl;resource-handler>org.libreccm.ui.CcmFaceletsResourceHandler</resource-handler>
|
||||
* </application>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
package org.libreccm.mvc.facelets;
|
||||
|
|
|
|||
|
|
@ -28,21 +28,17 @@ import java.io.Reader;
|
|||
|
||||
import javax.servlet.ServletContext;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
/**
|
||||
* A copy of the {@link TemplateLoader} used by Krazo.
|
||||
*
|
||||
* The {@code TemplateLoader} used by Krazo is defined as inner class. This
|
||||
* class provides the same behaviour as "real" class so that we can use it with
|
||||
* Freemarker {@link MultiTemplateLoader}.
|
||||
* class provides the same behaviour as this inner class so that we can use it
|
||||
* with Freemarker's {@link MultiTemplateLoader}.
|
||||
*
|
||||
* As extension this implementation of the {@code TemplateLoader} interface will
|
||||
* not process template paths which start with {@code @themes/} or
|
||||
* {@code /@themes/}. These path are processed by the templates loaders for the
|
||||
* theming system.
|
||||
* As extension to Krazo's implementation this implementation of the
|
||||
* {@code TemplateLoader} interface will not process template paths which start
|
||||
* with {@code @themes/} or {@code /@themes/}. These path are processed by the
|
||||
* {@link ThemesTemplateLoader} for the theming system.
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,6 +20,25 @@
|
|||
* The classes in this package integrate LibreCCM with Jakarta EE MVC and its
|
||||
* reference implementation Eclipse Krazo.
|
||||
*
|
||||
* And the the moment the ViewEngines for Facelets and Freemarker are supported.
|
||||
* The integration allows it to load templates for these ViewEngines either from
|
||||
* the default locations or from a theme. If the path of template starts with
|
||||
* {@code @themes/} or {@code /@themes/} the integration will delegate loading of
|
||||
* the template to {@link Themes} of the theme. The path must follow the following
|
||||
* pattern:
|
||||
*
|
||||
* <pre>
|
||||
* @themes/$themeName/$version/$pathToTemplate
|
||||
* </pre>
|
||||
*
|
||||
* Where {@code $themeName} is the name of the theme, {@code $version} is the
|
||||
* version of the theme (either {@code live} or {@code draft} and
|
||||
* {@code $pathToFile} is the path the template.
|
||||
*
|
||||
* If the path does not start with {@code @themes/} or {@code /@themes/} the
|
||||
* template will be loaded from the default location(s) used by Jakarta EE
|
||||
* MVC/Eclipse Krazo.
|
||||
*
|
||||
* @see https://www.mvc-spec.org/
|
||||
*/
|
||||
package org.libreccm.mvc;
|
||||
|
|
|
|||
Loading…
Reference in New Issue