WARNING!!! Configuration with initialization parameters is deprecated! If you still want to use it, please refer to 2.1 version of this page.
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.
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:
With Tiles 2.1+ you can customize rendering in three ways:
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 overriding the registerAttributeRenderers of BasicTilesContainerFactory if you are using Java-based configuration.
The behaviour of Tiles when the type of an attribute is not specified can be also customized. You can do it by overriding the createDefaultAttributeRenderer of BasicTilesContainerFactory if you are using Java-based configuration.
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 overriding the createRendererFactory of BasicTilesContainerFactory if you are using Java-based configuration.