Simulation Panel App

The Simulation Panel App provides new functionality in Liferay Portal’s Simulation Menu. When deploying this sample with no customizations, the Simulation Sample feature is provided in the Simulation Menu with four options.

What API(s) and/or code components does this sample highlight?

This sample leverages the PanelApp API.

How does this sample leverage the API(s) and/or code component?

This sample leverages the PanelApp interface as an OSGi service via the @Component annotation:

@Component(
    immediate = true,
    property = {
        "panel.app.order:Integer=500",
        "panel.category.key=" + SimulationPanelCategory.SIMULATION
    },
    service = PanelApp.class
)

There are also two properties provided via the @Component annotation:

  • panel.app.order: the order in which the panel app is displayed among other panel apps in the chosen category. Entries are ordered from top to bottom. For example, an entry with order 1 will be listed above an entry with order 2. If the order is not specified, it’s chosen at random based on which service was registered first in the OSGi container.
  • panel.category.key: the host panel category for your panel app, which should be the Simulation Menu category.

The simulation panel app extends the BaseJSPPanelApp, which provides a skeletal implementation of the PanelApp interface with JSP support. JSPs, however, are not the only way to provide frontend functionality to your panel categories/apps. You can create your own class implementing PanelApp to use other technologies, such as FreeMarker.

To learn more about Liferay Portal’s product navigation using panel categories and panel apps, see the Customizing the Product Menu tutorial. For more information on extending the Simulation Menu, see the Extending the Simulation Menu tutorial.

Where Is This Sample?

There are three different versions of this sample, each built with a different build tool:

0 (0 Votes)
Shared Language Keys Previous