What’s New

This section covers new features of Jmix framework and Studio 2.3, as well as some breaking changes to be aware of when upgrading from a previous version of the framework.

How To Upgrade

To create new projects with Jmix 2.3 or to upgrade an existing project, you need Studio 2.3 or later, so update your Jmix Studio plugin first.

The minimal supported IntelliJ IDEA version is now 2023.3.

See Upgrading Project section for how to upgrade your project using Studio. The automatic migration procedure makes the following changes in your project:

  • Updates the version of Jmix BOM which in turn defines versions of all dependencies.

  • Updates the version of Jmix Gradle plugin.

  • Updates the version of Gradle wrapper to 8.7 in gradle/wrapper/gradle-wrapper.properties.

  • Add lumoImports property to frontend/themes/<theme-name>/theme.json.

  • Replaces @Autowired with @ViewComponent for injection of MessageBundle in views.

  • The jmix.ui.component.filter-show-non-jpa-properties application property is set to false.

  • Usages of io.jmix.flowui.component.validation.group.UiCrossFieldChecks are replaced with io.jmix.core.validation.group.UiCrossFieldChecks.

  • If the project uses an Oracle data store, org.eclipse.persistence.oracle dependency is added and JDBC driver dependency is updated.

See also the full list of breaking changes that can affect your project after the upgrade.

New Features and Improvements

Superset Add-on

The new Superset add-on is designed to integrate Jmix applications with Apache Superset. It allows you to embed dashboards into application views.

See the Superset add-on documentation for more information.

Support for OpenSearch

The Search add-on now supports OpenSearch in addition to Elasticsearch. See the add-on’s installation section for how to choose the server.

Fragments

A fragment is a new UI building block that can be used as a part of views and other fragments.

Fragments allow for code reuse and help break down complex views into smaller, more manageable parts.

See the Fragments section for more information.

Data Repositories in Views

Now you can easily delegate loading and saving data in views to Spring Data repositories.

When creating an entity list or detail view, select the Use Data Repositories checkbox in the Advanced section of the wizard’s first page, and choose an existing data repository from the dropdown. The wizard will generate the load and save delegates that invoke appropriate repository methods.

Load methods of repositories inherited from JmixDataRepository now support an additional argument of the JmixDataRepositoryContext type. It allows you to pass the filtering, paging and sorting parameters collected from UI components to the LoadContext object. As a result, all the features of genericFilter, simplePagination and dataGrid components will work seamlessly with data repositories.

Lazy Tabs in TabSheet

A tab in a tabSheet can now be marked as lazy. The content of such a tab will not be loaded automatically, which improves performance for views with many tabs containing a lot of UI components.

See the Lazy Tabs section for more information.

TwinColumn Component

The new twinColumn component lets users intuitively select items from a list or collection by moving them between two columns.

In order to fix #3157, the API of ViewNavigators has been changed: the navigation now requires you to specify an origin view. Old methods are deprecated, and it is recommended to replace them with the new ones accepting an origin view.

If the calling class is not a view, and you cannot pass this as an origin, use UiComponentUtils.getCurrentView(), for example:

viewNavigators.view(UiComponentUtils.getCurrentView(), viewId).navigate();

In UI tests, the current view can be obtained by UiTestUtils.getCurrentView(), for example:

View<?> parent = UiTestUtils.getCurrentView();
viewNavigators.view(parent, UserListView.class).navigate();

When navigating to a process form, Jmix now uses the taskId or processDefinitionId URL query parameter. This allows for safe reloading of the webpage and saving a deep link to the form.

AuthenticationPrincipalResolver

A mechanism of resolving a current user object has been introduced. It delegates to the chain of AuthenticationPrincipalResolver implementations that try to return a correct user object. The standard implementation in the Authorization Server add-on fixes the issue which prevented the use of user attributes in REST API requests.

An application project can provide its own AuthenticationPrincipalResolver implementations if needed.

Resource Owner Password Credentials Grant

The Authorization Server add-on now implements the Resource Owner Password Credentials grant. It can be used in trusted, legacy, or highly controlled environments for simple authentication of REST clients as registered Jmix application users.

See the Authorization Server add-on documentation for more information.

Exposing Services in Generic REST

The new experimental way of exposing service methods as Generic REST endpoints has been introduced.

Instead of creating the rest-services.xml file as described in the Generic REST documentation, you can use the io.jmix.rest.annotation.RestService and io.jmix.rest.annotation.RestMethod annotations on the service class and business method respectively.

See #1323 for more information.

Liquibase Changelog Aggregation

The new Aggregate Liquibase Changelogs action is available in the data store context menu of Jmix Studio. It allows you to combine several latest changelogs into one, avoiding duplicated actions in changesets.

This feature can be used by developers before each commit to a shared code repository. It helps to maintain a tidy collection of changelogs and reduces the application startup time due to fewer changesets.

Generation of UI Exception Handlers

Now you can generate a UI exception handler using the New → Advanced → UI Exception Handler action of the Jmix tool window.

UI Component Structure Improvements

  • You can easily convert one component into another using the Convert to action in the structure context menu.

  • Multiple selected components can be wrapped into a TabSheet tab using the Wrap into action.

Breaking Changes

UI Security Configuration

The UI security configuration has been reworked. The io.jmix.securityflowui.FlowuiSecurityConfiguration class is now deprecated. If your project extends this class, you must update your configuration to extend the new io.jmix.securityflowui.security.FlowuiVaadinWebSecurity class.

See #3182 for more information.

Explicit Lumo Imports

The application theme must explicitly declare imports from Lumo theme, for example:

frontend/themes/onboarding/theme.json
{
 "parent": "jmix-lumo",
 "lumoImports": [
  "typography",
  "color",
  "spacing",
  "badge",
  "utility"
 ]
}

The Studio migration process will automatically make this change.

See #3347 for more information.

@ViewComponent for Injecting MessageBundle

The @ViewComponent annotation must be used to inject MessageBundle into a view. The Studio migration process will automatically update all existing views.

See #2812 for more information.

Lazy Loaded Soft Deleted OneToOne Reference

The lazy loading of soft-deleted one-to-one references has been fixed. Now it behaves the same as eager loading with fetch plans:

  • Soft-deleted entities are loaded through one-to-one references from the owning side.

  • Soft-deleted entities are NOT loaded through one-to-one references from the mappedBy side.

Previously, the behavior of lazy loading was opposite.

See #2466 for more information.

VectorLayer Default Style

When using the Maps add-on, the default style is now removed with the VectorLayer.removeAllStyles() method. To restore the default style, add it explicitly before the others. For example:

@ViewComponent("map.vector")
private VectorLayer vector;

@Subscribe
private void onInit(final InitEvent event) {
    vector.removeAllStyles();
    vector.addStyles(
            Style.createDefaultStyle(),
            new Style());
}

See #3140 for more information.

Changelog