Simulation Panel App

The Simulation Panel App provides new functionality in Liferay DXP’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:

    immediate = true,
    property = {
        "panel.category.key=" + SimulationPanelCategory.SIMULATION
    service = PanelApp.class

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

  • 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:

« Shared Language KeysSpring MVC Portlet »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0