MenuBarsLoaderService
Returns the MenuBars instance for the UI.
The default implementation de-serializes the menubars.layout…
file read from the classpath.
The service is called by the default implementation of MenuBarsService .
API
interface MenuBarsLoaderService {
boolean supportsReloading() (1)
Optional<T> menuBars(MenuBarsMarshallerService<T> marshaller) (2)
}
1 | supportsReloading()
Whether dynamic reloading of layouts is enabled. |
2 | menuBars(MenuBarsMarshallerService)
Optionally returns a new instance of a MenuBars , based on whether the underlying resource could be found, loaded and parsed. |
Members
supportsReloading()
Whether dynamic reloading of layouts is enabled.
If not, then the calling MenuBarsService will cache the layout once loaded.
menuBars(MenuBarsMarshallerService)
Optionally returns a new instance of a MenuBars , based on whether the underlying resource could be found, loaded and parsed.
Implementation
The Core Runtime Services module provides a default implementation of this service, MenuBarsLoaderServiceDefault.
This searches for a classpath resource menubars.layout.xml
, located in the root package.
Reloading is supported only in prototype mode.
The location of this file (and its name) can be overridden using the refguide:config:sections/causeway.viewer.common.adoc#causeway.viewer.common.application.menubars-layout-file configuration property.
For example:
causeway:
viewer:
common:
application:
menubars-layout-file: demoapp/dom/menubars.layout.xml