Post Reply 
Author Possibility to customize the site root module of the page engine
AT core team member

Find all posts by this user
Quote this message in a reply
Default  10 February 2014 16:06
1. Requirements

As soon as the page engine is started, an instance of class aria.pageEngine.SiteRootModule is used as the root module controller of the whole application. Whenever a common or page-specific module controller is declared in the site configuration or in a page definition, an instance of such module is loaded as submodule of the above-mentioned root controller.

The limit of this approach is that it is not possible to listen to submodule events and react to them, because the common parent module is hard-coded.

In order to allow developers to take advantage of the events mechanism, and more in general to add features that need to be placed in the root module controller, it is desirable to be able to customize it.

2. Technical solution

The technical solution proposed here consists in
  • Add a "rootModule" property in the configuration object that is provided as an argument of the start method of the page engine class ( This argument is now descibed by this bean definition
  • The "rootModule" property has to be of type InitModuleCtrl, with the classpath of the module controller that the developer wants to use as root module. (If some initArgs are specified, they have to be merged with the ones that the page engine injects automatically when creating an instance of the root module.)
  • The customized controller has to extend aria.pageEngine.SiteRootModule. An error should be raised otherwise.

3. History

10/02/2014 creation - Francesco Longo
21/02/2014 update - Francesco Longo
(This post was last modified: 21 February 2014 18:15 by flongo.)
Post Reply