Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor wording tweaks

...

Most other configuration occurs inside your application's module class. The application module class will often define new services, provide overrides of services, or make contributions to service configurations.

Tapestry looks for a your application module class in the services package (under the root package) of your application. It capitalizes the <filter-name> and appends "Module". In the previous example, because the filter name was "app" and the application's root package name is "org.example.myapp", the module class would be org.example.myapp.services.AppModule.

If such a class exists, it is added to the IoC Registry. It is not an error for your application to not have a module class, though any non-trivial application will have a moduleone.

An Your application module will often class (usually AppModule.java) will typically override some of Tapestry's default, or "factory", symbols, by contributing overrides to the ApplicationDefaults service configuration. For example:

Code Block
java
java
titleAppModule.java
public class AppModule
{
  public static void contributeApplicationDefaults(MappedConfiguration<String,String> configuration)
  {
    configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,fr,de");
    configuration.add(SymbolConstants.FILE_CHECK_INTERVAL, "10 m");
  }
}

...