You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tiles.apache.org by ap...@apache.org on 2009/07/27 12:01:47 UTC
svn commit: r798090 - in /tiles/framework/trunk/src/site: apt/ apt/how-to/
apt/migration/ apt/tutorial/ apt/tutorial/advanced/ apt/tutorial/basic/
apt/tutorial/extension/ xdoc/dev/
Author: apetrelli
Date: Mon Jul 27 10:01:47 2009
New Revision: 798090
URL: http://svn.apache.org/viewvc?rev=798090&view=rev
Log:
TILES-445
Removed docs, but added links to 2.1 versions of pages when these pages have been modified.
Modified:
tiles/framework/trunk/src/site/apt/config-reference.apt
tiles/framework/trunk/src/site/apt/getting_started.apt
tiles/framework/trunk/src/site/apt/how-to/definitions-db.apt
tiles/framework/trunk/src/site/apt/migration/configuration.apt
tiles/framework/trunk/src/site/apt/tutorial/advanced/attribute-rendering.apt
tiles/framework/trunk/src/site/apt/tutorial/advanced/el-support.apt
tiles/framework/trunk/src/site/apt/tutorial/advanced/multiple-containers.apt
tiles/framework/trunk/src/site/apt/tutorial/basic/pages.apt
tiles/framework/trunk/src/site/apt/tutorial/configuration.apt
tiles/framework/trunk/src/site/apt/tutorial/extension/url_definitions_factory.apt
tiles/framework/trunk/src/site/apt/tutorial/wildcard-configuration.apt
tiles/framework/trunk/src/site/apt/whats-new.apt
tiles/framework/trunk/src/site/xdoc/dev/building.xml
Modified: tiles/framework/trunk/src/site/apt/config-reference.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/config-reference.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/config-reference.apt (original)
+++ tiles/framework/trunk/src/site/apt/config-reference.apt Mon Jul 27 10:01:47 2009
@@ -21,401 +21,7 @@
Tiles Configuration reference
-----------
-Configuration reference
+ Tiles configuration via initialization parameter has been deprecated.
+ Please try to upgrade to {{{tutorial/configuration.html}pure Java configuration}}.
- In this page you can find a fast reference on configuring the various parts of
- Tiles. These configuration parameters can be used as context parameters of a
- web application, or as init parameters of servlets, filters or portlets.
-
-Summary
-
-* Standard configuration
-
- [[1]] {{{config-reference.html#Main_configuration}Main configuration}}.
-
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.context.AbstractTilesApplicationContextFactory}<<<org.apache.tiles.context.AbstractTilesApplicationContextFactory>>>}} | Tiles application context factory class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.context.TilesRequestContextFactory}<<<org.apache.tiles.context.TilesRequestContextFactory>>>}} | Tiles request context factory class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.factory.AbstractTilesContainerFactory}<<<org.apache.tiles.factory.AbstractTilesContainerFactory>>>}} | Class name of the container factory |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.factory.TilesContainerFactory.MUTABLE}<<<org.apache.tiles.factory.TilesContainerFactory.MUTABLE>>>}} | Flag to use a mutable container |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.definition.DefinitionsFactory}<<<org.apache.tiles.definition.DefinitionsFactory>>>}} | Definitions factory class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG}<<<org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG>>>}} | List of paths that contain Tiles definitions |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.evaluator.AttributeEvaluator}<<<org.apache.tiles.evaluator.AttributeEvaluator>>>}} | Attribute evaluator class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.preparer.PreparerFactory}<<<org.apache.tiles.preparer.PreparerFactory>>>}} | View preparer factory class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.renderer.RendererFactory}<<<org.apache.tiles.renderer.RendererFactory>>>}} | Attribute renderer factory class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.renderer.impl.BasicRendererFactory.TYPE_RENDERERS}<<<org.apache.tiles.renderer.impl.BasicRendererFactory.TYPE_RENDERERS>>>}} | Attribute renderers class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.renderer.impl.BasicRendererFactory.DEFAULT_RENDERER}<<<org.apache.tiles.renderer.impl.BasicRendererFactory.DEFAULT_RENDERER>>>}} | Default attribute renderer class name |
-*---------------------------------------------+--------------------------------------+
-
- [[2]] {{{config-reference.html#CachingLocaleUrlDefinitionDAO_configuration}<<<CachingLocaleUrlDefinitionDAO>>> configuration}}.
-
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.definition.dao.LocaleUrlDefinitionDAO.CHECK_REFRESH}<<<org.apache.tiles.definition.dao.LocaleUrlDefinitionDAO.CHECK_REFRESH>>>}} | Flag to enable automatic refresh check |
-*---------------------------------------------+--------------------------------------+
-
- [[3]] {{{config-reference.html#ChainedTilesApplicationContextFactory_configuration}<<<ChainedTilesApplicationContextFactory>>> configuration}}.
-
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.context.ChainedTilesApplicationContextFactory.FACTORY_CLASS_NAMES}<<<org.apache.tiles.context.ChainedTilesApplicationContextFactory.FACTORY_CLASS_NAMES>>>}} | List of elementary application factory class names |
-*---------------------------------------------+--------------------------------------+
-
- [[4]] {{{config-reference.html#ChainedTilesRequestContextFactory_configuration}<<<ChainedTilesRequestContextFactory>>> configuration}}.
-
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.context.ChainedTilesRequestContextFactory.FACTORY_CLASS_NAMES}<<<org.apache.tiles.context.ChainedTilesRequestContextFactory.FACTORY_CLASS_NAMES>>>}} | List of elementary request factory class names |
-*---------------------------------------------+--------------------------------------+
-
- [[5]] {{{config-reference.html#DigesterDefinitionsReader_configuration}<<<DigesterDefinitionsReader>>> configuration}}.
-
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE}<<<org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE>>>}} | Flag to deactivate XML parser validation |
-*---------------------------------------------+--------------------------------------+
-
- [[6]] {{{config-reference.html#UrlDefinitionsFactory_configuration}<<<UrlDefinitionsFactory>>> configuration}}.
-
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.definition.DefinitionsReader}<<<org.apache.tiles.definition.DefinitionsReader>>>}} | Definitions reader class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.locale.LocaleResolver}<<<org.apache.tiles.locale.LocaleResolver>>>}} | Locale resolver class name |
-*---------------------------------------------+--------------------------------------+
-
- [[7]] {{{config-reference.html#Initialization_configuration}<<<Initialization>>> configuration}}.
-
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.startup.BasicTilesInitializer.CONTAINER_KEY}<<<org.apache.tiles.startup.BasicTilesInitializer.CONTAINER_KEY>>>}} | Container key |
-*---------------------------------------------+--------------------------------------+
-
-* Extended configuration
-
- [[1]] {{{config-reference.html#KeyedDefinitionsFactoryTilesContainerFactory_configuration}<<<KeyedDefinitionsFactoryTilesContainerFactory>>> configuration}}.
-
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.impl.KeyedDefinitionsFactoryTilesContainer.KeyExtractor}<<<org.apache.tiles.impl.KeyedDefinitionsFactoryTilesContainer.KeyExtractor>>>}} | Key extractor class name |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.factory.KeyedDefinitionsFactoryTilesContainerFactory.KEYS}<<<org.apache.tiles.factory.KeyedDefinitionsFactoryTilesContainerFactory.KEYS>>>}} | List of keys to be used |
-*---------------------------------------------+--------------------------------------+
-| {{{config-reference.html#org.apache.tiles.DEFINITIONS_CONFIG@$\{key\}}<<<org.apache.tiles.DEFINITIONS_CONFIG@$\{key\}>>>}} | List of paths containing definitions for the given <<<key>>> |
-*---------------------------------------------+--------------------------------------+
-
-* Deprecated configuration
-
- The following configuration parameters are deprecated:
-
- * <<<org.apache.tiles.context.ChainedTilesContextFactory.FACTORY_CLASS_NAMES>>>: use
- {{{config-reference.html#org.apache.tiles.context.ChainedTilesApplicationContextFactory.FACTORY_CLASS_NAMES}<<<org.apache.tiles.context.ChainedTilesApplicationContextFactory.FACTORY_CLASS_NAMES>>>}}
- or
- {{{config-reference.html#org.apache.tiles.context.ChainedTilesRequestContextFactory.FACTORY_CLASS_NAMES}<<<org.apache.tiles.context.ChainedTilesRequestContextFactory.FACTORY_CLASS_NAMES>>>}}
-
- * <<<org.apache.tiles.context.TilesContextFactory>>>: use
- {{{config-reference.html#org.apache.tiles.context.AbstractTilesApplicationContextFactory}<<<org.apache.tiles.context.AbstractTilesApplicationContextFactory>>>}}
- or
- {{{config-reference.html#org.apache.tiles.context.TilesRequestContextFactory}<<<org.apache.tiles.context.TilesRequestContextFactory>>>}}
-
- * <<<org.apache.tiles.factory.TilesContainerFactory>>>: use
- {{{config-reference.html#org.apache.tiles.factory.AbstractTilesContainerFactory}<<<org.apache.tiles.factory.AbstractTilesContainerFactory>>>}}
-
- * <<<org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG>>>: use
- {{{config-reference.html#org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG}<<<org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG>>>}}
-
-Standard configuration parameters
-
-* {Main configuration}
-
-** {<<<org.apache.tiles.context.AbstractTilesApplicationContextFactory>>>}
-
- Specifies the application context factory class name to use.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/context/AbstractTilesApplicationContextFactory.html#APPLICATION_CONTEXT_FACTORY_INIT_PARAM}<<<org.apache.tiles.context.AbstractTilesApplicationContextFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.context.ChainedTilesApplicationContextFactory>>>.
-
- * <<Usage>>: when specified, it must contain the name of a class that
- implements the <<<AbstractTilesApplicationContextFactory>>> interface.
-
-** {<<<org.apache.tiles.context.TilesRequestContextFactory>>>}
-
- Specifies the request context factory class name to use.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/TilesContainerFactory.html#REQUEST_CONTEXT_FACTORY_INIT_PARAM}<<<org.apache.tiles.factory.TilesContainerFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.context.ChainedTilesRequestContextFactory>>>.
-
- * <<Usage>>: when specified, it must contain the name of a class that
- implements the <<<TilesRequestContextFactory>>> interface.
-
-** {<<<org.apache.tiles.factory.AbstractTilesContainerFactory>>>}
-
- Specifies the container factory class name to use.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/AbstractTilesContainerFactory.html#CONTAINER_FACTORY_INIT_PARAM}<<<org.apache.tiles.factory.AbstractTilesContainerFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.factory.TilesContainerFactory>>>.
-
- * <<Usage>>: when specified, it must contain the name of a class that
- extends the <<<AbstractTilesContainerFactory>>> class.
-
-** {<<<org.apache.tiles.factory.TilesContainerFactory.MUTABLE>>>}
-
- Flag to use a mutable container.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/TilesContainerFactory.html#CONTAINER_FACTORY_MUTABLE_INIT_PARAM}<<<org.apache.tiles.factory.TilesContainerFactory>>>}}.
-
- * <<Default>>: <<<false>>> (the container is not mutable).
-
- * <<Usage>>: when specified and when its value is <<<true>>>, the container to
- be created will be <mutable>, i.e. definitions can be created at runtime.
-
-** {<<<org.apache.tiles.definition.DefinitionsFactory>>>}
-
- Specifies the context factory class name to use.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/TilesContainerFactory.html#DEFINITIONS_FACTORY_INIT_PARAM}<<<org.apache.tiles.factory.TilesContainerFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.definition.UrlDefinitionsFactory>>>.
-
- * <<Usage>>: when specified, it must contain the name of a class that
- implements the <<<DefinitionsFactory>>> interface.
-
-** {<<<org.apache.tiles.evaluator.AttributeEvaluator>>>}
-
- Specifies the attribute evaluator class name to use.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/TilesContainerFactory.html#ATTRIBUTE_EVALUATOR_INIT_PARAM}<<<org.apache.tiles.factory.TilesContainerFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.evaluator.impl.DirectAttributeEvaluator>>>.
-
- * <<Usage>>: when specified, it must contain the name of a class that
- implements the <<<AttributeEvaluator>>> interface.
-
-** {<<<org.apache.tiles.preparer.PreparerFactory>>>}
-
- Specifies the view preparer factory class name to use.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/TilesContainerFactory.html#PREPARER_FACTORY_INIT_PARAM}<<<org.apache.tiles.factory.TilesContainerFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.preparer.BasicPreparerFactory>>>.
-
- * <<Usage>>: when specified, it must contain the name of a class that
- implements the <<<PreparerFactory>>> interface.
-
-** {<<<org.apache.tiles.renderer.RendererFactory>>>}
-
- Specify the class of the attribute renderer factory to use.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/TilesContainerFactory.html#RENDERER_FACTORY_INIT_PARAM}<<<org.apache.tiles.factory.TilesContainerFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.renderer.impl.BasicRendererFactory>>>
-
- * <<Usage>>: when specified, it must contain the class name of the attribute
- renderer factory to use.
-
-** {<<<org.apache.tiles.renderer.impl.BasicRendererFactory.TYPE_RENDERERS>>>}
-
- Specifies the named attribute renderers that can be used.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/renderer/impl/BasicRendererFactory.html#TYPE_RENDERERS_INIT_PARAM}<<<org.apache.tiles.renderer.impl.BasicRendererFactory>>>}}.
-
- * <<Default>>: <<<string,org.apache.tiles.renderer.impl.StringAttributeRenderer;
- definition,org.apache.tiles.renderer.impl.DefinitionAttributeRenderer;
- template,org.apache.tiles.renderer.impl.TemplateAttributeRenderer>>>.
-
- * <<Usage>>: when specified, it must contain a semicolon (;) separated list
- of comma-separated pairs (,) in which:
-
- ** the first element is the name of the renderer;
-
- ** the second element is the class name of the attribute renderer.
-
-** {<<<org.apache.tiles.renderer.impl.BasicRendererFactory.DEFAULT_RENDERER>>>}
-
- Specifies the named attribute renderers that can be used.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/renderer/impl/BasicRendererFactory.html#DEFAULT_RENDERER_INIT_PARAM}<<<org.apache.tiles.renderer.impl.BasicRendererFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.renderer.impl.UntypedAttributeRenderer>>>
-
- * <<Usage>>: when specified, it must contain the class name of the attribute
- renderer to use in case the type of an attribute is not specified.
-
-* {<<<BasicTilesContainer>>> configuration}
-
-** {<<<org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG>>>}
-
- Specifies the list of files that contain the definitions.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/definition/DefinitionsFactory.html#DEFINITIONS_CONFIG}<<<org.apache.tiles.definition.DefinitionsFactory>>>}}.
-
- * <<Default>>: <<</WEB-INF/tiles.xml>>>.
-
- * <<Usage>>: when specified, it must contain a comma-separated list of paths
- of files that contain Tiles definitions.
-
-* {<<<CachingLocaleUrlDefinitionDAO>>> configuration}
-
-** {<<<org.apache.tiles.definition.dao.LocaleUrlDefinitionDAO.CHECK_REFRESH>>>}
-
- Flag that indicates whether to auto-refresh definitions when definition files are modified.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/definition/dao/CachingLocaleUrlDefinitionDAO.html#CHECK_REFRESH_INIT_PARAMETER}<<<org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO>>>}}.
-
- * <<Default>>: <<<false>>> (no caching)
-
- * <<Usage>>: Set to <<<true>>> if you want to enable auto refresh of definitions files.
-
-* {<<<ChainedTilesApplicationContextFactory>>> configuration}
-
-** {<<<org.apache.tiles.context.ChainedTilesApplicationContextFactory.FACTORY_CLASS_NAMES>>>}
-
- Specifies the list of elementary Tiles application context factory class names.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/context/ChainedTilesApplicationContextFactory.html#FACTORY_CLASS_NAMES}<<<org.apache.tiles.context.ChainedTilesApplicationContextFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.servlet.context.ServletTilesApplicationContextFactory,
- org.apache.tiles.portlet.context.PortletApplicationTilesApplicationContextFactory>>>
-
- * <<Usage>>: when specified, it must contain a comma-separated list of class
- names extending
- {{{apidocs/org/apache/tiles/context/AbstractTilesApplicationContextFactory.html}<<<AbstractTilesApplicationContextFactory>>>}}.
-
-* {<<<ChainedTilesRequestContextFactory>>> configuration}
-
-** {<<<org.apache.tiles.context.ChainedTilesRequestContextFactory.FACTORY_CLASS_NAMES>>>}
-
- Specifies the list of elementary Tiles request context factory class names.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/context/ChainedTilesRequestContextFactory.html#FACTORY_CLASS_NAMES}<<<org.apache.tiles.context.ChainedTilesRequestContextFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.servlet.context.ServletTilesRequestContextFactory,
- org.apache.tiles.portlet.context.PortletTilesRequestContextFactory,
- org.apache.tiles.jsp.context.JspTilesRequestContextFactory>>>
-
- * <<Usage>>: when specified, it must contain a comma-separated list of class
- names implementing
- {{{apidocs/org/apache/tiles/context/TilesRequestContextFactory.html}<<<TilesRequestContextFactory>>>}}.
-
-* {<<<DigesterDefinitionsReader>>> configuration}
-
-** {<<<org.apache.tiles.definition.digester.DigesterDefinitionsReader.PARSER_VALIDATE>>>}
-
- Specifies if the digester should validate input XML files.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/definition/digester/DigesterDefinitionsReader.html#PARSER_VALIDATE_PARAMETER_NAME}<<<org.apache.tiles.definition.digester.DigesterDefinitionsReader>>>}}.
-
- * <<Default>>: <<<true>>>
-
- * <<Usage>>: when specified, it must be <<<true>>> if you want to enable
- validation, <<<false>>> otherwise..
-
-* {<<<UrlDefinitionsFactory>>> configuration}
-
-** {<<<org.apache.tiles.definition.DefinitionsReader>>>}
-
- Specifies the implementation of
- {{{apidocs/org/apache/tiles/definition/DefinitionsReader.html}<<<DefinitionsReader>>>}}
- to use.
-
- * <<Specified in>>:
- {{{apidocs/constant-values.html#org.apache.tiles.definition.DefinitionsFactory.READER_IMPL_PROPERTY}<<<org.apache.tiles.definition.DefinitionsFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.definition.digester.DigesterDefinitionsReader>>>
-
- * <<Usage>>: when specified, it must contain the name of a class implementing
- {{{apidocs/org/apache/tiles/definition/DefinitionsReader.html}<<<DefinitionsReader>>>}}.
-
-** {<<<org.apache.tiles.locale.LocaleResolver>>>}
-
- Specifies the implementation of
- {{{apidocs/org/apache/tiles/locale/LocaleResolver.html}<<<LocaleResolver>>>}}
- to use.
-
- * <<Specified in>>:
- {{{apidocs/constant-values.html#org.apache.tiles.definition.DefinitionsFactory.LOCALE_RESOLVER_IMPL_PROPERTY}<<<org.apache.tiles.definition.DefinitionsFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.locale.impl.DefaultLocaleResolver>>>
-
- * <<Usage>>: when specified, it must contain the name of a class implementing
- {{{apidocs/org/apache/tiles/locale/LocaleResolver.html}<<<LocaleResolver>>>}}.
-
-* {Initialization configuration}
-
-** {<<<org.apache.tiles.startup.BasicTilesInitializer.CONTAINER_KEY>>>}
-
- Specifies the key under which the Tiles container will be stored.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/startup/BasicTilesInitializer.html#CONTAINER_KEY_INIT_PARAMETER}<<<org.apache.tiles.startup.BasicTilesInitializer>>>}}.
-
- * <<Default>>: <<<null>>> (default container)
-
- * <<Usage>>: when specified, it must contain the key under which the container
- will be stored.
-
-Extended configuration parameters
-
-* {<<<KeyedDefinitionsFactoryTilesContainerFactory>>> configuration}
-
-** {<<<org.apache.tiles.impl.KeyedDefinitionsFactoryTilesContainer.KeyExtractor>>>}
-
- Specifies the implementation of
- {{{apidocs/org/apache/tiles/impl/KeyedDefinitionsFactoryTilesContainer.KeyExtractor.html}<<<KeyExtractor>>>}}
- to use.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/KeyedDefinitionsFactoryTilesContainerFactory.html#KEY_EXTRACTOR_CLASS_INIT_PARAM}<<<org.apache.tiles.factory.KeyedDefinitionsFactoryTilesContainerFactory>>>}}.
-
- * <<Default>>: <<<org.apache.tiles.impl.KeyedDefinitionsFactoryTilesContainer.DefaultKeyExtractor>>>
-
- * <<Usage>>: when specified, it must contain the name of a class implementing
- {{{apidocs/org/apache/tiles/impl/KeyedDefinitionsFactoryTilesContainer.KeyExtractor.html}<<<KeyExtractor>>>}}.
-
-** {<<<org.apache.tiles.factory.KeyedDefinitionsFactoryTilesContainerFactory.KEYS>>>}
-
- Specifies the list of keys to be used to assign a key to each Definitions
- Factory.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/factory/KeyedDefinitionsFactoryTilesContainerFactory.html#CONTAINER_KEYS_INIT_PARAM}<<<org.apache.tiles.factory.KeyedDefinitionsFactoryTilesContainerFactory>>>}}.
-
- * <<Default>>: None, it must be specified explicitly.
-
- * <<Usage>>: when specified, it must contain a comma-separated list of keys
- to be used to assign a key to each definitions factory.
-
-** {<<<org.apache.tiles.DEFINITIONS_CONFIG@$\{key\}>>>}
-
- Specifies the list of files that contain the definitions for the corresponding
- <<<$\{key\}>>>.
-
- * <<Specified in>>:
- {{{apidocs/org/apache/tiles/impl/KeyedDefinitionsFactoryTilesContainer.html#DEFINITIONS_CONFIG_PREFIX}<<<org.apache.tiles.impl.KeyedDefinitionsFactoryTilesContainer>>>}}.
-
- * <<Default>>: <<</WEB-INF/tiles.xml>>>.
-
- * <<Usage>>: when specified, it must contain a comma-separated list of paths
- of files that contain Tiles definitions to assign to the needed
- <<<$\{key\}>>>.
+ You can find the original documentation at the {{{../2.1/framework/config-reference.html}2.1 configuration reference}}.
Modified: tiles/framework/trunk/src/site/apt/getting_started.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/getting_started.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/getting_started.apt (original)
+++ tiles/framework/trunk/src/site/apt/getting_started.apt Mon Jul 27 10:01:47 2009
@@ -24,7 +24,7 @@
Requirements
To use Tiles in your application you need:
-
+
* a Java Runtime Environment following the <<Java SE 5.0>> specifications;
* a servlet container that supports <<Servlet 2.4>> (or above) and <<JSP
@@ -33,7 +33,7 @@
Installation
To install Tiles in your web application:
-
+
* {{{../download.html}download}} a distribution of Tiles;
* if you downloaded the binary distribution, unpack it;
@@ -45,23 +45,24 @@
across the container;
* copy the Tiles dependencies JARs:
-
+
** {{{http://jakarta.apache.org/commons/beanutils/}Jakarta Commons BeanUtils}}
- 1.7.0 or above;
-
+ 1.8.0 or above;
+
** {{{http://jakarta.apache.org/commons/digester/}Jakarta Commons Digester}}
- 1.8 or above;
-
- ** {{{http://jakarta.apache.org/commons/logging/}Jakarta Commons Logging}}
- (at least API) 1.1 or above.
-
+ 2.0 or above;
+
+ ** {{{http://www.slf4j.org/}SLF4J}} (API and an implementation) 1.5.8 or above.
+ You might need "jcl-over-slf4j" too.
+
These dependencies are present in the <<<lib>>> directory of the binary
distribution;
- * if you need JSP support, copy the <<<tiles-jsp-VERSION.jar>>> in the
+ * if you need JSP support, copy the <<<tiles-jsp-VERSION.jar>>>
+ and <<<tiles-template-VERSION.jar>>> in the
<<<WEB-INF/lib>>> directory of your web application;
- * if you need to load Tiles definition files using wildcards, copy the
+ * if you need to load Tiles definition files using wildcards, copy the
<<<spring-web-VERSION.jar>>>, <<<spring-core-VERSION.jar>>>,
<<<spring-context-VERSION.jar>>>, <<<spring-beans-VERSION.jar>>>,
<<<aopalliance-VERSION.jar>>> files under the <<<WEB-INF/lib>>> directory;
@@ -72,10 +73,6 @@
<<<spring-beans-VERSION.jar>>>, <<<aopalliance-VERSION.jar>>> files under the
<<<WEB-INF/lib>>> directory;
- * if you need to use EL in XML definition files under a Servlet 2.4/JSP 2.0
- environment, copy <<<el-api-VERSION.jar>>> and <<<jasper-el-VERSION.jar>>>
- files under the <<<WEB-INF/lib>>> directory.
-
Usage
If you are using Tiles for the first time, read the
@@ -87,13 +84,13 @@
Examples
To see Tiles in action, there are two examples:
-
+
* The Tiles test web application, included in <<<examples>>> directory of the
binary distribution ({{{download.html}download it}}).
-
+
* The Tiles showcase, that shows Tiles features and integration with other
technologies and frameworks (currently only Struts 1).
-
+
Currently it is still under development, and you can access it through its
subversion repository:
Modified: tiles/framework/trunk/src/site/apt/how-to/definitions-db.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/how-to/definitions-db.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/how-to/definitions-db.apt (original)
+++ tiles/framework/trunk/src/site/apt/how-to/definitions-db.apt Mon Jul 27 10:01:47 2009
@@ -197,18 +197,33 @@
}
-------------------------------------
+ Create a Tiles listener this way:
+
+-------------------------------------
+public class TestDbTilesListener extends AbstractTilesListener {
+
+ @Override
+ protected TilesInitializer createTilesInitializer() {
+ return new TestDbTilesInitializer();
+ }
+
+ private static class TestDbTilesInitializer extends AbstractTilesInitializer {
+
+ @Override
+ protected AbstractTilesContainerFactory createContainerFactory(
+ TilesApplicationContext context) {
+ return new TestDbTilesContainerFactory();
+ }
+ }
+}
+-------------------------------------
+
In <<<web.xml>>> add this piece of configuration:
-------------------------------------
-<servlet>
- <servlet-name>tiles-db</servlet-name>
- <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
- <init-param>
- <param-name>org.apache.tiles.factory.AbstractTilesContainerFactory</param-name>
- <param-value>org.apache.tiles.test.factory.TestDbTilesContainerFactory</param-value>
- </init-param>
-</servlet>
+<listener>
+ <listener-class>org.apache.tiles.test.listener.TestDbTilesListener</listener-class>
+</listener>
-------------------------------------
And you're done!
-
\ No newline at end of file
Modified: tiles/framework/trunk/src/site/apt/migration/configuration.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/migration/configuration.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/migration/configuration.apt (original)
+++ tiles/framework/trunk/src/site/apt/migration/configuration.apt Mon Jul 27 10:01:47 2009
@@ -23,7 +23,7 @@
{Reusing old Tiles configuration files}
- With Tiles 2.1 it is possible to use old Struts-Tiles definition files, since
+ With Tiles 2.1 and 2.2 it is possible to use old Struts-Tiles definition files, since
1.1 version.
To use this feature it is needed to:
@@ -31,11 +31,11 @@
* include the <<<tiles-compat-xxx.jar>>> package in the classpath;
* configure the compatibility definitions reader instance, that is able to
- read old definition files.
+ read old definition files.
-* Configuration using Java
+* Configuration
- If you are using Java-based configuration, override the
+ Override the
{{{../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#createDefinitionsReader(java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesRequestContextFactory)}createDefinitionsReader}}
method this way:
@@ -70,37 +70,10 @@
}
---------------------------------------
+ <<WARNING!!!>> Configuration with initialization parameter has been deprecated! If you
+ still want to use it, please refer to the
+ {{{../../2.1/framework/migration/configuration.html}2.1 version of this page}}.
-* Configuration using initialization parameters
-
- If you are using configuration using initialization parameters in
- <<<web.xml>>> you can have to override the
- {{{../config-reference.html#org.apache.tiles.definition.DefinitionsReader}<<<org.apache.tiles.definition.DefinitionsReader>>>}}
- parameter this way:
-
----------------------------------------
-<init-param>
- <param-name>org.apache.tiles.definition.DefinitionsReader</param-name>
- <param-value>org.apache.tiles.compat.definition.digester.CompatibilityDigesterDefinitionsReader</param-value>
-</init-param>
----------------------------------------
-
- You need to add a renderer for the "page" attribute type, that is in fact the "template" type.
- So set the
- {{{../config-reference.html#org.apache.tiles.renderer.impl.BasicRendererFactory.TYPE_RENDERERS}<<<org.apache.tiles.renderer.impl.BasicRendererFactory.TYPE_RENDERERS>>>}}
- this way:
-
----------------------------------------
-<init-param>
- <param-name>org.apache.tiles.renderer.impl.BasicRendererFactory.TYPE_RENDERERS</param-name>
- <param-value>
- string,org.apache.tiles.renderer.impl.StringAttributeRenderer;
- definition,org.apache.tiles.renderer.impl.DefinitionAttributeRenderer;
- template,org.apache.tiles.renderer.impl.TemplateAttributeRenderer;
- page,org.apache.tiles.renderer.impl.TemplateAttributeRenderer
- </param-value>
-</init-param>
----------------------------------------
Tiles configuration files translation
@@ -120,9 +93,9 @@
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
------------------------------------------------------------
-
+
* Definitions attributes
-
+
*---------------------------------+--------------------------------+
| <<Struts-Tiles>> | <<Tiles 2>> |
*---------------------------------+--------------------------------+
@@ -171,7 +144,7 @@
* \[3\] <<<\<add-list-attribute\>>>> is used when it is needed to a list
attribute as an element of another list attribute.
-
+
[]
* Previous Migration Pages
Modified: tiles/framework/trunk/src/site/apt/tutorial/advanced/attribute-rendering.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/advanced/attribute-rendering.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/advanced/attribute-rendering.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/advanced/attribute-rendering.apt Mon Jul 27 10:01:47 2009
@@ -21,16 +21,20 @@
Attribute rendering
-----------
+ <<WARNING!!!>> Configuration with initialization parameters is deprecated! If you still
+ want to use it, please refer to
+ {{{../../../2.1/framework/tutorial/advanced/attribute-rendering.html}2.1 version of this page}}.
+
Attribute rendering
- With Tiles 2.1, attribute rendering behaviour can be customized. The "type"
+ With Tiles 2.2 and 2.1, attribute rendering behaviour can be customized. The "type"
of an attribute can be still <<<string>>>, <<<definition>>> or <<<template>>>
but you can define new types or use a class name directly.
Default behaviour
The behaviour that Tiles follows is compatible with Tiles 2.0 and it applies
- both to XML definition files and JSP tags. Tiles follows these steps:
+ both to XML definition files and JSP tags. Tiles follows these steps:
* If the type is not specified:
@@ -51,7 +55,7 @@
Customize attribute rendering
- With Tiles 2.1 you can customize rendering in three ways:
+ With Tiles 2.1+ you can customize rendering in three ways:
* specifying new renderers;
@@ -62,26 +66,14 @@
* Custom attribute renderers
If you don't want to use class names as attribute types, you can use new
- "named" custom attribute renderers. You can do it by:
-
- * using the
- {{{../../config-reference.html#org.apache.tiles.renderer.impl.BasicRendererFactory.TYPE_RENDERERS}<<<org.apache.tiles.renderer.impl.BasicRendererFactory.TYPE_RENDERERS>>>}}
- init parameter, if you are using parameter-based initialization;
-
- * overriding the
+ "named" custom attribute renderers. You can do it by overriding the
{{{../../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#registerAttributeRenderers(org.apache.tiles.renderer.impl.BasicRendererFactory,%20java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesRequestContextFactory,%20org.apache.tiles.TilesContainer,%20org.apache.tiles.evaluator.AttributeEvaluator)}registerAttributeRenderers}}
of <<<BasicTilesContainerFactory>>> if you are using Java-based configuration.
* Custom default attribute renderer
The behaviour of Tiles when the type of an attribute is not specified can be
- also customized. You can do it by:
-
- * using the
- {{{../../config-reference.html#org.apache.tiles.renderer.impl.BasicRendererFactory.DEFAULT_RENDERER}<<<org.apache.tiles.renderer.impl.BasicRendererFactory.DEFAULT_RENDERER>>>}}
- init parameter, if you are using parameter-based initialization;
-
- * overriding the
+ also customized. You can do it by overriding the
{{{../../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#createDefaultAttributeRenderer(java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesRequestContextFactory,%20org.apache.tiles.TilesContainer,%20org.apache.tiles.evaluator.AttributeEvaluator)}createDefaultAttributeRenderer}}
of <<<BasicTilesContainerFactory>>> if you are using Java-based configuration.
@@ -89,13 +81,6 @@
The attribute renderer factory can be completely customized, leaving to you
the maximum freedom of choice in the attribute renderer creation. You can
- specify the factory's implementation by:
-
- * using the
- {{{../../config-reference.html#org.apache.tiles.renderer.RendererFactory}<<<org.apache.tiles.renderer.RendererFactory>>>}}
- init parameter, if you are using parameter-based initialization;
-
- * overriding the
+ specify the factory's implementation by overriding the
{{{../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#createRendererFactory(java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesRequestContextFactory,%20org.apache.tiles.TilesContainer,%20org.apache.tiles.evaluator.AttributeEvaluator)}createRendererFactory}}
of <<<BasicTilesContainerFactory>>> if you are using Java-based configuration.
-
\ No newline at end of file
Modified: tiles/framework/trunk/src/site/apt/tutorial/advanced/el-support.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/advanced/el-support.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/advanced/el-support.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/advanced/el-support.apt Mon Jul 27 10:01:47 2009
@@ -21,6 +21,10 @@
Expression Language (EL) support
-----------
+ <<WARNING!!!>> Configuration with initialization parameters is deprecated! If you still
+ want to use it, please refer to
+ {{{../../../2.1/framework/tutorial/advanced/el-support.html}2.1 version of this page}}.
+
Expression Language support
With Tiles it is possible to use expression languages not only in JSP pages, but also in XML
@@ -54,32 +58,6 @@
------------------------------------
-** Deprecated configuration
-
- To enable expression language support in XML definition files, you can do it with
- init parameters by configuring the class of the
- {{{../../apidocs/org/apache/tiles/evaluator/AttributeEvaluator.html} AttributeEvaluator}}.
-
- Using declarative configuration in <<<web.xml>>> file, you have to use the
- {{{../../config-reference.html#org.apache.tiles.evaluator.AttributeEvaluator} org.apache.tiles.evaluator.AttributeEvaluator}}
- parameter. In the case of <<<TilesServlet>>>:
-
-------------------------------------
-<servlet>
- <servlet-name>tiles-init</servlet-name>
- <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
- <init-param>
- <param-name>org.apache.tiles.evaluator.AttributeEvaluator</param-name>
- <param-value>org.apache.tiles.evaluator.el.ELAttributeEvaluator</param-value>
- </init-param>
-</servlet>
-------------------------------------
-
- If you are using programmatic configuration via Java, override the
- {{{../../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#createEvaluator(java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesRequestContextFactory,%20org.apache.tiles.locale.LocaleResolver)} createEvaluator}}
- method, providing <<only the creation>> of the instance of the
- <<<AttributeEvaluator>>>.
-
* EL support
The EL language is supported since Tiles 2.1. If you are using Servlet 2.5 or above,
Modified: tiles/framework/trunk/src/site/apt/tutorial/advanced/multiple-containers.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/advanced/multiple-containers.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/advanced/multiple-containers.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/advanced/multiple-containers.apt Mon Jul 27 10:01:47 2009
@@ -21,6 +21,10 @@
Using multiple containers
-----------
+ <<WARNING!!!>> Configuration with initialization parameters is deprecated! If you still
+ want to use it, please refer to
+ {{{../../../2.1/framework/tutorial/advanced/multiple-containers.html}2.1 version of this page}}.
+
Defining multiple containers
With Tiles 2.1 it is possible to use more that one Tiles container in your
@@ -28,19 +32,34 @@
* Configuration
- To use an alternate container, it must be configured through the use of the
- {{{../../config-reference.html#org.apache.tiles.startup.BasicTilesInitializer.CONTAINER_KEY}org.apache.tiles.startup.BasicTilesInitializer.CONTAINER_KEY}}
- initialization parameter. For example:
-
-------------------------------------
-<servlet>
- <servlet-name>tiles-alt</servlet-name>
- <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
- <init-param>
- <param-name>org.apache.tiles.startup.BasicTilesInitializer.CONTAINER_KEY</param-name>
- <param-value>alternate</param-value>
- </init-param>
-</servlet>
+ To use an alternate container, you need to override the
+ {{{../../apidocs/org/apache/tiles/startup/AbstractTilesInitializer.html#getContainerKey(org.apache.tiles.TilesApplicationContext)}getContainerKey}}
+ method of <<<AbstractTilesInitializer>>> this way:
+
+------------------------------------
+public class TestAlternateTilesListener extends AbstractTilesListener {
+
+ /** {@inheritDoc} */
+ @Override
+ protected TilesInitializer createTilesInitializer() {
+ return new TestAlternateTilesInitializer();
+ }
+
+ /**
+ * Test Tiles initializer for Tiles initialization of the alternate container.
+ */
+ private static class TestAlternateTilesInitializer extends AbstractTilesInitializer {
+
+ // Other customizations go here.
+
+ /** {@inheritDoc} */
+ @Override
+ protected String getContainerKey(
+ TilesApplicationContext applicationContext) {
+ return "myContainerKey";
+ }
+ }
+}
------------------------------------
Selecting one non-default container
Modified: tiles/framework/trunk/src/site/apt/tutorial/basic/pages.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/basic/pages.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/basic/pages.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/basic/pages.apt Mon Jul 27 10:01:47 2009
@@ -21,6 +21,10 @@
Creating Tiles Pages
-----------
+ <<WARNING!!!>> Configuration with initialization parameters is deprecated! If you still
+ want to use it, please refer to
+ {{{../../../2.1/framework/tutorial/basic/pages.html}2.1 version of this page}}.
+
Creating and using Tiles pages
After installing and learning some of Tiles concepts, it is time to create
@@ -79,24 +83,62 @@
You can put everything you want in this pages, they are just a test.
-* Create a definition
+* Create Tiles configuration
+
+ To load the Tiles definition files, override the
+ {{{../../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#getSourceURLs(org.apache.tiles.TilesApplicationContext, org.apache.tiles.context.TilesRequestContextFactory)}getSourceURLs}}
+ method of <<<BasicTilesContainerFactory>>> this way:
+
+------------------------------------
+public class TestTilesContainerFactory extends BasicTilesContainerFactory {
+
+ @Override
+ protected List<URL> getSourceURLs(TilesApplicationContext applicationContext,
+ TilesRequestContextFactory contextFactory) {
+ List<URL> urls = new ArrayList<URL>();
+ try {
+ urls.add(applicationContext.getResource("/WEB-INF/tiles-defs.xml"));
+ } catch (IOException e) {
+ throw new DefinitionsFactoryException(
+ "Cannot load definition URLs", e);
+ }
+ return urls;
+ }
+}
+------------------------------------
+
+ Create the Tiles listener along with an inner class that represents the initializer:
+
+------------------------------------
+public class TestTilesListener extends AbstractTilesListener {
+
+ @Override
+ protected TilesInitializer createTilesInitializer() {
+ return new TestTilesListenerInitializer();
+ }
+
+ private static class TestTilesListenerInitializer extends AbstractTilesInitializer {
+
+ @Override
+ protected AbstractTilesContainerFactory createContainerFactory(
+ TilesApplicationContext context) {
+ return new TestTilesContainerFactory();
+ }
+ }
+}
+------------------------------------
- Supposing that you configured Tiles, in <<<web.xml>>>, to startup using the
- <<<TilesServlet>>>, you need to specify what will be the files containing the
- Tiles definitions to load:
+ Define the listener in <<<web.xml>>>
------------------------------------
-<servlet>
- <servlet-name>tiles</servlet-name>
- <servlet-class>org.apache.tiles.servlet.startup.TilesServlet</servlet-class>
- <init-param>
- <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
- <param-value>/WEB-INF/tiles-defs.xml</param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
-</servlet>
+<listener>
+ <listener-class>my.package.TestTilesListener</listener-class>
+</listener>
------------------------------------
+
+* Create a definition
+
Create the <<</WEB-INF/tiles-defs.xml>>> file:
------------------------------------
@@ -118,7 +160,7 @@
* Render the definition
After creating the definition, you can render it:
-
+
* by using the <<<\<tiles:insertDefinition /\>>>> tag, inserting it in a JSP
page:
@@ -129,7 +171,7 @@
* in other cases, you can render directly in the response, by using the Tiles
container:
-
+
-----------------------------------
TilesContainer container = TilesAccess.getContainer(
request.getSession().getServletContext());
@@ -137,7 +179,7 @@
-----------------------------------
* by using {{{../advanced/utils.html}Rendering Utilities}} provided by Tiles.
-
+
* by using a supporting framework. See
{{{../integration/index.html}Integrations}} for a list of supporting
frameworks.
Modified: tiles/framework/trunk/src/site/apt/tutorial/configuration.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/configuration.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/configuration.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/configuration.apt Mon Jul 27 10:01:47 2009
@@ -21,132 +21,76 @@
Tiles Configuration
-----------
+ <<WARNING!!!>> Configuration with initialization parameters is deprecated! If you still
+ want to use it, please refer to
+ {{{../../2.1/framework/tutorial/configuration.html}2.1 version of this page}}.
+
Configuring Tiles
Your application needs to be configured to work with Tiles. There are various
options, depending on your needs, your application type, etc.
-
+
Starting Tiles in a web application
Tiles has always been a web application package, usually used in conjunction
with Struts. Tiles 2 evolved to the point of being technology-independent, but
its use in a Servlet-based web application will be the most frequent use case.
-
-* Starting Tiles engine
- To start Tiles you can use pure
- {{{configuration.html#Startup_with_Java_code}Java initialization}}
- or the original
- {{{configuration.html#Startup_with_initialization_parameters}initialization-parameter-based initialization}}.
- In both cases, you have two options, just choose what is the best for your
- needs:
-
- * Load the <<Tiles servlet>> at startup. You can do it by specifying it in
- your <<<web.xml>>> file:
-
---------------------------
-<servlet>
- <servlet-name>tiles</servlet-name>
- <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
- ...
- <load-on-startup>2</load-on-startup>
-</servlet>
---------------------------
-
- Note: The Tiles servlet is just a startup servlet and <<it does not serve any
- request>>. Therefore, a mapping is not needed.
-
- * Load the <<Tiles listener>>. Specify it in your <<<web.xml>>> file:
-
--------------------------------
-<listener>
- <listener-class>org.apache.tiles.web.startup.TilesListener</listener-class>
-</listener>
--------------------------------
-
-** {Startup with Java code}
+* Starting Tiles engine
- To startup with Java code, extend <<<TilesListener>>> or <<<TilesServlet>>>
- and override the <<<createTilesServletInitializer>>> method:
+ To start Tiles you can either extend
+ {{{../apidocs/org/apache/tiles/web/startup/AbstractTilesListener.html}AbstractTilesListener}}
+ or
+ {{{../apidocs/org/apache/tiles/web/startup/AbstractTilesServlet.html}AbstractTilesServlet}},
+ in particular implement the <<<createTilesServletInitializer>>> method:
--------------------------
protected TilesInitializer createTilesInitializer() {
- return new MyCustomTilesInitializer;
+ return new MyCustomTilesInitializer();
}
--------------------------
-** {Startup with initialization parameters}
+ You can use {{{../apidocs/org/apache/tiles/startup/AbstractTilesInitializer.html}AbstractTilesInitializer}}
+ as a basis.
+
+** Configuration of the startup class
- You can configure Tiles by using initialization parameters, like in Tiles 2.0.x.
- If you use <<<TilesServlet>>>, you can use <<<init-param>>> elements:
+ * If you created a servlet, load i at startup. You can do it by specifying it in
+ your <<<web.xml>>> file:
--------------------------
<servlet>
<servlet-name>tiles</servlet-name>
- <servlet-class>org.apache.tiles.web.startup.TilesServlet</servlet-class>
- <init-param>
- <param-name>
- org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG
- </param-name>
- <param-value>
- /WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
- </param-value>
- </init-param>
+ <servlet-class>my.package.MyTilesServlet</servlet-class>
+ ...
<load-on-startup>2</load-on-startup>
</servlet>
--------------------------
- As you can see, the init parameter
- <<<org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG>>>
- specifies the path of the {{{basic/index.html}Tiles configuration files}}.
- You can specify it also as a context parameters.
-
- If you use <<<TilesListener>>>:
+ Note: The Tiles servlet is just a startup servlet and <<it does not serve any
+ request>>. Therefore, a mapping is not needed.
+
+ * If you created a listener, load it by specifing it in your <<<web.xml>>> file:
-------------------------------
<listener>
- <listener-class>org.apache.tiles.web.startup.TilesListener</listener-class>
+ <listener-class>my.package.MyTilesListener</listener-class>
</listener>
-------------------------------
-
- you can specify the Tiles configuration files using a context parameter:
-
--------------------------------
- <context-param>
- <param-name>
- org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
- </param-name>
- <param-value>
- /WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
- </param-value>
- </context-param>
--------------------------------
-Starting Tiles in a portlet application
+Starting Tiles in a portlet application
TBD
Configuring Tiles internals
-* {Pure Java configuration}
-
- In both environments, it is possible to use pure <<Java configuration>>,
- without messing with the deployment descriptors. You have two choices of configuration:
-
- * By using a custom
- {{{../apidocs/org/apache/tiles/startup/TilesInitializer.html}TilesInitializer}},
- for example by overriding
- {{{../apidocs/org/apache/tiles/startup/BasicTilesInitializer.html}BasicTilesInitializer}}
- methods.
-
- * By using a subset of initialization parameters and extending
- {{{../apidocs/org/apache/tiles/factory/AbstractTilesContainerFactory.html}AbstractTilesContainerFactory}},
- {{{../apidocs/org/apache/tiles/context/AbstractTilesApplicationContextFactory.html}AbstractTilesApplicationContextFactory}}
- or both. This option can be combined with the first.
+ The container and the application context must be configured to allow custom behaviour
+ and to load definitions from various sources.
-** Custom Tiles container factory
+* Custom Tiles container factory
- You have to do create a class that extends
+ Custom Tiles containers can be created by custom Tiles container factories.
+ You have to create a class that extends
{{{../apidocs/org/apache/tiles/factory/AbstractTilesContainerFactory.html}AbstractTilesContainerFactory}}.
In particular you can use {{{../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html}BasicTilesContainerFactory}}
as a basis for your extended configuration. <<<BasicTilesContainerFactory>>>
@@ -157,49 +101,41 @@
documents all the methods that can be overridden to use your own
configuration.
- To enable pure Java configuration, provide the
- {{{../config-reference.html#org.apache.tiles.factory.AbstractTilesContainerFactory}<<<org.apache.tiles.factory.AbstractTilesContainerFactory>>>}}
- parameter this way:
-
---------------------------------
-<init-param>
- <param-name>org.apache.tiles.factory.AbstractTilesContainerFactory</param-name>
- <param-value>org.apache.tiles.test.factory.TestTilesContainerFactory</param-value>
-</init-param>
---------------------------------
-
- Where <<<TestTilesContainerFactory>>> is a class that extends
- <<<AbstractTilesContainerFactory>>>.
-
-** Custom Tiles application context factory
-
- You have to do create a class that extends
- {{{../apidocs/org/apache/tiles/context/AbstractTilesApplicationContextFactory.html}AbstractTilesApplicationContextFactory}}
- In particular you can use
- {{{../apidocs/org/apache/tiles/servlet/context/ServletTilesApplicationContextFactory.html}ServletTilesApplicationContextFactory}}
- as a basis for your extended configuration under a servlet environment.
-
- To enable pure Java configuration for the Tiles application context, provide the
- {{{../config-reference.html#org.apache.tiles.context.AbstractTilesApplicationContextFactory}<<<org.apache.tiles.context.AbstractTilesApplicationContextFactory>>>}}
- parameter this way:
-
---------------------------------
-<init-param>
- <param-name>org.apache.tiles.context.AbstractTilesApplicationContextFactory</param-name>
- <param-value>org.apache.tiles.test.context.TestTilesApplicationContextFactory</param-value>
-</init-param>
---------------------------------
-
- Where <<<TestTilesApplicationContextFactory>>> is a class that extends
- <<<AbstractTilesApplicationContextFactory>>>.
-
-* Configuration through initialization parameters
-
- You can configure Tiles internal behaviour by specifying:
-
- * in a web application environment, by using context parameters or init
- parameters of TilesServlet or TilesFilter;
-
- * in a portlet environment, by using portlet init parameters.
-
- For the details see {{{../config-reference.html}Tiles configuration reference}}.
+* Custom Tiles application context factory
+
+ Custom Tiles application context can be provided by implementing
+ {{{../apidocs/org/apache/tiles/TilesApplicationContext.html}TilesApplicationContext}}.
+ If you are under a servlet environment, you can override
+ {{{../apidocs/org/apache/tiles/servlet/context/ServletTilesApplicationContext.html}ServletTilesApplicationContext}}.
+
+ To use it, you need to override the
+ {{{../apidocs/org/apache/tiles/startup/AbstractTilesInitializer.html#createTilesApplicationContext(org.apache.tiles.TilesApplicationContext)}createTilesApplicationContext}}
+ method of AbstractTilesInitializer.
+
+ The reason to use a custom Tiles application context could be:
+
+ * supporting a platform not supported yet;
+
+ * providing custom behaviour, such as loading resources in a different manner.
+
+Ready-made configuration classes
+
+ There are some classes that allows to play with Tiles without writing custom code.
+
+* Simple configuration
+
+ {{{../apidocs/org/apache/tiles/web/startup/simple/SimpleTilesInitializerServlet.html}SimpleTilesInitializerServlet}}
+ and
+ {{{../apidocs/org/apache/tiles/web/startup/simple/SimpleTilesListener.html}SimpleTilesListener}}
+ are two ways to load Tiles in the "simple" way. This was the default for Tiles 2.1 and prior versions.
+
+ This configuration has the following characteristics:
+
+ * loads the "/WEB-INF/tiles.xml" file;
+
+ * allows support for JSP, Servlets and Portlets;
+
+ * no expression language is allowed;
+
+ * wildcard expressions can be used to declare definition names.
+
Modified: tiles/framework/trunk/src/site/apt/tutorial/extension/url_definitions_factory.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/extension/url_definitions_factory.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/extension/url_definitions_factory.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/extension/url_definitions_factory.apt Mon Jul 27 10:01:47 2009
@@ -21,11 +21,11 @@
Customizing UrlDefinitionsFactory
-----------
-Customizing UrlDefinitionsFactory
+Customizing LocaleDefinitionsFactory
The
- {{{../../config-reference.html#UrlDefinitionsFactory configuration}<<<UrlDefinitionsFactory>>>}}
- is the default implementation of
+ {{{../../apidocs/org/apache/tiles/definition/LocaleDefinitionsFactory.html}<<<LocaleDefinitionsFactory>>>}}
+ class is the default implementation of
{{{../../apidocs/org/apache/tiles/definition/DefinitionsFactory.html}<<<DefinitionsFactory>>>}}.
* Definitions reader
@@ -36,7 +36,7 @@
their inheritance <<not resolved>>) definitions. The default implementation,
{{{../../apidocs/org/apache/tiles/definition/digester/DigesterDefinitionsReader.html}<<<DigesterDefinitionsReader>>>}}
reads from usual Tiles XML definition files using Jakarta Commons Digester.
-
+
If you need to read definitions from other kind of sources, this is the item
to configure.
@@ -52,4 +52,4 @@
the request will be taken.
If you want to read the current locale in other ways, this is the item to
- configure.
\ No newline at end of file
+ configure.
Modified: tiles/framework/trunk/src/site/apt/tutorial/wildcard-configuration.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/wildcard-configuration.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/wildcard-configuration.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/wildcard-configuration.apt Mon Jul 27 10:01:47 2009
@@ -21,6 +21,10 @@
Load XML definition files using wildcards
-----------
+ <<WARNING!!!>> Configuration with initialization parameters is deprecated! If you still
+ want to use it, please refer to
+ {{{../../2.1/framework/tutorial/wildcard-configuration.html}2.1 version of this page}}.
+
Load XML definition files using wildcards
XML definition files can be loaded using wildcard, but this behaviour is not
@@ -46,40 +50,22 @@
* Configuration
To be able to specify Tiles XML definition files using wildcards, there is the
- need to override the Tiles application context creation. For example, if you
- are using parameter-based initialization, provide a new value for the
- {{{../config-reference.html#org.apache.tiles.context.AbstractTilesApplicationContextFactory}<<<org.apache.tiles.context.AbstractTilesApplicationContextFactory>>>}}
- init parameter. For example:
+ need to override the Tiles application context creation, by overriding the
+ {{{../apidocs/org/apache/tiles/startup/AbstractTilesInitializer.html#createTilesApplicationContext(org.apache.tiles.TilesApplicationContext)}createTilesApplicationContext}}
+ method this way:
-----------------------------------------
-<init-param>
- <param-name>org.apache.tiles.context.AbstractTilesApplicationContextFactory</param-name>
- <param-value>
- org.apache.tiles.servlet.context.wildcard.WildcardServletTilesApplicationContextFactory
- </param-value>
-</init-param>
-----------------------------------------
+-------------------------------
+@Override
+protected TilesApplicationContext createTilesApplicationContext(
+ TilesApplicationContext preliminaryContext) {
+ return new WildcardServletTilesApplicationContext(
+ (ServletContext) preliminaryContext.getContext());
+}
+-------------------------------
* Usage
- To load XML definition files using wilcards you can proceed, as usual, in two
- ways:
-
-
- * If you are using parameter-based initialization, provide a new value for the
- {{{../config-reference.html#org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG}<<<org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG>>>}}
- init parameter. The files that have an underscore (_) in their name will be
- skipped. You can specify, for example:
-
-----------------------------------------
-<init-param>
- <param-name>org.apache.tiles.definition.DefinitionsFactory.DEFINITIONS_CONFIG</param-name>
- <param-value>/WEB-INF/tiles-defs*.xml,
- classpath:/org/apache/**/tiles-defs.xml</param-value>
-</init-param>
-----------------------------------------
-
- * If you are using Java-based configuration, override the
+ To load XML definition files using wilcards, override the
{{{../apidocs/org/apache/tiles/factory/BasicTilesContainerFactory.html#getSourceURLs(java.lang.Object,%20org.apache.tiles.TilesApplicationContext,%20org.apache.tiles.context.TilesApplicationContextFactory)}getSourceURLs}}
of <<<BasicTilesContainerFactory>>>. In the following example, notice the
manual exclusion of files including underscores (_):
Modified: tiles/framework/trunk/src/site/apt/whats-new.apt
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/whats-new.apt?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/whats-new.apt (original)
+++ tiles/framework/trunk/src/site/apt/whats-new.apt Mon Jul 27 10:01:47 2009
@@ -43,6 +43,12 @@
{{{tutorial/advanced/el-support.html#MVEL_Support}MVEL support}}
in Tiles definition files, when specifying attributes and templates.
+* Deprecations in Tiles 2.2
+
+ * Startup with initialization parameters is not <<deprecated>>. See the
+ {{{tutorial/configuration.html}configuration}} page to know how to configure
+ Tiles with Java.
+
* New features in Tiles 2.1
Tiles 2.1 introduces new features, but remaining compatible to Tiles 2.0.x.
Modified: tiles/framework/trunk/src/site/xdoc/dev/building.xml
URL: http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/xdoc/dev/building.xml?rev=798090&r1=798089&r2=798090&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/xdoc/dev/building.xml (original)
+++ tiles/framework/trunk/src/site/xdoc/dev/building.xml Mon Jul 27 10:01:47 2009
@@ -39,11 +39,6 @@
sites and JavaDoc report itself) you need to install
<a href="http://www.graphviz.org/">GraphViz</a>, otherwise you will
notice missing pictures inside JavaDocs pages.</p>
- <p>WARNING: Due to some bugs in recent versions of GraphViz, we
- reccomend to use
- <a href="http://www.graphviz.org/pub/graphviz/ARCHIVE">GraphViz
- version 2.8</a>, otherwise you will notice that client HTML maps do
- not work properly.</p>
</subsection>
<subsection name="Building main packages">
<p>To build Tiles 2 from source you need to:</p>