MenuBarsLoaderService (interface)

Returns the BS3MenuBars instance (bootstrap3-specific subtype of org.apache.isis.applib.layout.menubars.MenuBars , for the UI.

The default implementation deserializes the menubars.layout.xml file read from the classpath.

The service is called by the default implementation of MenuBarsService .

API

MenuBarsLoaderService.java
interface MenuBarsLoaderService {
  boolean supportsReloading()     (1)
  BS3MenuBars menuBars()     (2)
}
1 supportsReloading()

Whether dynamic reloading of layouts is enabled.

2 menuBars()

Returns a new instance of a BS3MenuBars if possible, else null .

Members

supportsReloading()

Whether dynamic reloading of layouts is enabled.

If not, then the calling MenuBarsService will cache the layout once loaded.

Returns a new instance of a BS3MenuBars if possible, else null .

Implementation

The framework provides a default implementation of this service, namely o.a.i.core.runtimeservices.menubars.MenuBarsLoaderServiceDefault. This searches for a classpath resource menubars.layout.xml, located ni the root package.

If using the Wicket viewer, the location of this file (and its name) can be overridden using the isis.viewer.wicket.application.menubars-layout-xml configuration property.

For example:

application.yaml
isis:
  viewer:
    wicket:
      application:
        menubars-layout-xml: demoapp/dom/menubars.layout.xml

The default implementaiton supports reloading only in prototype mode.

See also