apache-tilestiles-3

How to get a list of Definition objects in apache tiles 3


I'm working with a legacy application which currently uses apache tiles 2. I'm in the process of upgrading it to 3.0, but encountered a problem with some of our custom code.

The code in question attempts to get a list of Definition objects and to find the name of a particular definition based on the template url attribute.

In Tiles 2 this is done using UrlDefinitionsFactory which has readDefinitions() method. This seems to be missing in Tiles 3.

How can I access a list of loaded definitions at runtime?


Solution

  • You'll be looking at DefinitionDAO.getDefinitions(locale)

    I guess you'd need to create one from scratch, via (or the same way as) your basicTilesContainerFactory.createLocaleDefinitionDao()