What’s New

This section covers new features of Jmix framework and Studio 2.0, 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.0 or to upgrade an existing project, you need Studio 2.0 or later, so update your Jmix Studio plugin first.

The minimal supported IntelliJ IDEA version is now 2022.3.

The automatic migration from Jmix 1.5 to 2.0 is possible only if your project is based on Flow UI and uses JDK 17.

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.0.2 in gradle/wrapper/gradle-wrapper.properties.

  • Replaces Java EE packages with Jakarta EE (javax to jakarta with some exceptions).

  • Replaces usages of io.jmix.core.metamodel.datatype.impl.EnumClass with io.jmix.core.metamodel.datatype.EnumClass.

  • Replaces usages of io.jmix.flowui.kit.component.FlowuiComponentUtils with io.jmix.flowui.kit.component.ComponentUtils.

  • Replaces usages of javax.annotation.Nullable with org.springframework.lang.Nullable.

  • Replaces application properties starting with jmix.flowui with jmix.ui.

  • Replaces flowui.loginToUi specific permission with ui.loginToUi.

  • In view descriptors:

    • Changes queryParameters element with urlQueryParameters.

    • Changes standard list action types to list_.

  • Adds a script block to the index.html file.

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

Updated Dependencies

The following major dependencies have been updated:

  • Spring Boot 3.1

  • Vaadin 24.0

  • EclipseLink 4.0

  • Flowable 7.0

Now you need JDK 17 to build and run applications.

WAR deployment requires Tomcat 10.

New Features and Improvements

Add-ons with Flow UI

The following add-ons are now available for projects with Flow UI:

Flow UI Test Assist

The Flow UI Test Assist module has been improved and now supports interaction between view. An example UI test for user management views is generated in a new application project.

See more information at #1467.

GenericFilter Component

The genericFilter component now allows you to create configurations and custom conditions at design time and at runtime. The runtime configurations and custom conditions can be managed by end users.

A design-time configuration example:

<genericFilter id="genericFilter" dataLoader="usersDl">
    <properties include=".*"/>
    <configurations>
        <configuration id="byEmail" name="By email">
            <propertyFilter operation="CONTAINS" property="email"/>
        </configuration>
    </configurations>
</genericFilter>

To create a configuration at runtime, add a few conditions and then save them as a configuration using the filter settings menu ("gear" button).

To create a custom condition at runtime, use Create button in the Add condition dialog.

CodeEditor Component

The new codeEditor component based on Ace editor allows users to view and edit code with syntax highlighting, automatic indentation and other advanced features. At the same time it provides the declarative data binding through the dataContainer and property attributes.

For example:

<codeEditor id="codeEditor" mode="GROOVY"
            dataContainer="taskDc" property="script"/>

Preventing Browser Tab Closing

Web browser now shows a standard confirmation about leaving the page if the user closes the browser tab when an entity detail view is displayed. It prevents accidental loss of unsaved data.

To turn off the confirmation for a view, call its setPreventBrowserTabClosing() method in the InitEvent handler:

@Subscribe
public void onInit(final InitEvent event) {
    setPreventBrowserTabClosing(false);
}

Passing Parameters in Navigation

The new way of passing parameters to views opened by navigation has been introduced: using the AfterViewNavigationEvent handler created in the calling code. It allows you to pass complex types easily, but the parameters are not reflected in the URL and lost if the user refreshes the web page.

See more information in the Opening Views section.

Quick Cloud Deployment

The Quick Cloud Deployment feature has been completely reworked and is now available by default in the Jmix tool window. It allows you to deploy your application to an automatically created AWS EC2 instance in a few clicks.

Beans in Jmix Tool Window

The Jmix tool window now displays a section with all beans defined in the project.

You can use OptionsGroup by Packages to switch from the plain list to a structured layout.

BPM in Jmix Tool Window

If your project includes the BPM add-on, the Jmix tool window now has the BPM section. The section displays BPMN processes, process drafts and DMN tables from the following project directories:

Section Directory File extensions

Processes

src/main/resources/processes

.bpmn or .bpmn20.xml

Process Drafts

src/main/resources/process-drafts

.draft.bpmn

DMN Tables

src/main/resources/dmn

.dmn.xml

When you execute the NewBPMN Process action, Studio creates a new process draft and displays it in the Process Drafts section. When the process is ready, click Copy to Processes button in the top actions panel of the BPM designer or use the context menu in the Jmix tool window. Then Studio will copy the draft to the Processes section and remove the draft extension from the file name.

The content of the Processes and DMN Tables sections is automatically deployed on the application start.

All Beans in Inject Dialog

The Inject dialog now displays all beans defined in the project classpath, including the ones defined in Java configurations with @Bean annotations.

When the grouping option in the dialog toolbar is on, the Other Beans and Other Properties sections group the content by the first non-TLD (top-level domain) part in the package name.

The presence of a class in the Inject dialog does not guarantee that the bean will be successfully injected at runtime. It depends on many conditions that cannot be reliably analyzed by Studio at design time.

Using Final Modifier

Studio now uses final modifier for fields, variables and method parameters when generating code.

You can switch this feature off in the Project Settings section of the Jmix plugin settings page.

OffsetDateTime for Audit Fields

Entity attributes used as timestamps in Audit of creation, Audit of modification and Soft Delete traits are now created with the OffsetDateTime type. So the database stores the timestamps with timezone.

Invalidating Studio Caches

Now you can remove information stored by Studio in IDE configuration directory, which may help if you are experiencing problems with project templates, generating views or with the view designer.

To do this, execute FileInvalidate Caches command, select Delete Jmix Studio templates and artifacts caches checkbox and click Invalidate and Restart.

Breaking Changes

Renamed Properties and Classes

  1. The jmix.flowui prefix for application properties has been renamed to jmix.ui. [1]

  2. Renamed security specific policies:

    • datatools.flowui.showEntityInfo > datatools.showEntityInfo

    • flowui.loginToUi > ui.loginToUi [1]

    • flowui.showExceptionDetails > ui.showExceptionDetails

    • flowui.filter.modifyJpqlCondition > ui.genericfilter.modifyJpqlCondition

    • flowui.filter.modifyConfiguration > ui.genericfilter.modifyConfiguration

    • flowui.genericfilter.modifyGlobalConfiguration > ui.genericfilter.modifyGlobalConfiguration

  3. The io.jmix.core.metamodel.datatype.impl.EnumClass base class has been moved to the io.jmix.core.metamodel.datatype package. [1]

  4. The queryParameters facet has been renamed to urlQueryParameters. [1]

  5. The list_ prefix has been added to standard list action types. [1]

  6. Renamed action types:

    • excelExportgrdexp_excelExport

    • showRoleAssignmentssec_showRoleAssignments

    • showRoleAssignmentssec_showRoleAssignments

    • resetPasswordsec_resetPassword

  7. In all framework classes except Spring configurations and auto-configurations, the Flowui prefix has been removed or replaced with Ui. The usages of io.jmix.flowui.kit.component.FlowuiComponentUtils are automatically replaced with ComponentUtils by the Studio migration procedure. If you have used other classes with Flowui prefix, change the usage manually. See more information at #1830.

Removed Features

  1. Methods of Actions interface creating an action by its class have been removed. You should replace them with methods creating actions by their string identifiers. See details at #1529.

  2. Support for tooltip has been removed from the following UI components: ComboButton, DropdownButton, SimplePagination, UserIndicator.

  3. The FlowuiLoginProperties class which was deprecated since Jmix 1.5, has been removed. If you created the project on Jmix 1.4, this class is used in your LoginView, so you should change the LoginView class and XML descriptor to the ones provided by the new project template of Jmix 2.0.

  4. The Jmix BOM does not provide the commons-fileupload:commons-fileupload dependency anymore.

  5. The jmix.rest.max-upload-size property has been removed. Use spring.servlet.multipart.max-file-size and other properties from MultipartProperties instead. See details at #1496.

Data Repositories Initialization

Previously optional @EnableJmixDataRepositories annotation is now required to initialize data repositories in the project. See details at #1589.

Rounding in Datatypes

The BigDecimal, Double and Float datatypes now round values according to specified formats when parsing values from strings. For example, "12.3456" string becomes 12.35 number if the format is #.##.

To return to the previous behaviour whithout rounding, set the jmix.core.round-decimal-value-by-format application property to false. See details at #968.

Bean Validation on Persistence Layer

Bean validation on persistence layer is now on by default. It means that when you save an entity instance using DataManager, EntityManager or data repositories, it will be validated and an exception will be thrown if the entity state is invalid.

You can switch the persistence validation off by specifying the following application property:

jakarta.persistence.validation.mode = NONE

Generic REST Access Control

Generic REST add-on now uses Jmix Authorization Server for obtaining access tokens. See more information in the Access Control section.

If you are using Generic REST, you should do the following:

  • Replace the io.jmix.security:jmix-security-oauth2-starter dependency with io.jmix.authserver:jmix-authserver-starter.

  • Configure Client Credentials or Authorization Code grant in the application.

  • Adapt your REST clients to the new method of obtaining access tokens.

Changelog


1. The Studio migration procedure makes appropriate changes in your project automatically.