What’s New
This section covers new features of Jmix framework and Studio 2.7, 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.7 or to upgrade an existing project, you need Studio 2.7 or later, so update your Jmix Studio plugin first. The minimal supported IntelliJ IDEA version is now 2025.1. |
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.
See also the full list of breaking changes that can affect your project after the upgrade.
Updated Dependencies
Vaadin has been updated to 24.9.
New Features and Improvements
Studio Improvements
-
The Role Designer now visualizes and manages the role inheritance hierarchy. It shows permissions inherited from base roles as read-only elements. The Entity permissions tab now highlights enabled and disabled elements using different colors.
-
The Add attribute from DB action in the Entity Designer allows you to use the "database-first" approach when developing your data model. You can first create a column in a database table, and then import it to the data model as an attribute mapped to the column.
-
If you select the new Create Data Repository checkbox in the New JPA Entity dialog, Studio creates a data repository for the new entity automatically, and remembers the state of the checkbox for the next entity creation. When creating views for an entity using the Create Jmix View wizard, Studio now automatically selects the Use Data Repositories checkbox if a data repository for this entity exists.
GroupDataGrid Component
The groupDataGrid component is a data grid that enables the grouping of rows based on the values in one or more columns.
See the Grouping Data Grid add-on section for information on how to install and use the component.
Card Component
The card component is a container designed to present content in a card format. It provides customization options for layout and appearance, allowing for the organization of related content and actions.
GridLayout Component
The gridLayout component arranges child components in a responsive, two-dimensional grid system based on the CSS Grid Layout. It allows you to render individual components, cards or fragments, and can be a viable alternative to data grids.
UserMenu Component
The new userMenu component allows you to visualize the logged-in user along with related actions such as Substitute user and Log out in a clear and visually appealing manner.
The dropdown menu of the component can contain predefined and custom actions, as well as nested items and other UI components.
The new project template now includes the userMenu component in the main view.
Date Filtering
The genericFilter and propertyFilter components now provides a new comparison operation: date equals. It omits time in datetime values and allows users to easily test if a datetime value is within a particular date.
The Date Interval dialog now supports arbitrary start and end date, and can be used instead of creating two conditions >= and < when checking if a datetime value is within a range.
Data Repositories
-
The
JmixDataRepositoryinterface now extendsorg.springframework.data.repository.ListCrudRepository, and all itsfindAll()methods that previously returnedIterablenow returnList. -
Jmix data repositories now support queries returning scalar values and aggregates. See the @Query annotation usage examples.
-
The
JmixDataRepositorymethods returningPageperform additionalcountrequest to the database to provide total number of items and pages in thePageobject. If you don’t need the number of pages in your logic, use the newfindAllSlice()methods returningSlice. This will reduce the load on the database. -
The new loadFromRepositoryDelegate and totalCountByRepositoryDelegate handlers simplify usage of data repositories in views. They allow you to invoke data repositories directly without converting parameters from the
LoadContextobject. If you select the Use Data Repositories checkbox in the View Creation Wizard, the created view will use the new delegates.
Design-Time Reports
The Reports add-on now supports defining report structure in annotated Java classes at design time. This approach brings the following benefits:
-
Report definitions are managed by the version control system (Git).
-
Updates to the reports are included in the new version of the application.
-
Developers can use step-by-step debugger and other IDE tools when working on data loading and other report logic.
The downside comparing to runtime reports is that users cannot modify the report in the running application.
See Report Generation guide for examples of creating reports at design time.
REST DataStore
The REST DataStore add-on now lets you share entities and service interfaces between integrated applications. This leads to tighter coupling between the applications, but reduces code duplication and development efforts.
See REST DataStore: Sharing Code Between Applications for more information.
Entity Log
The Entity Log now can track changes in many-to-many attributes on the owning side.
Breaking Changes
JmixDataRepository Method Overriding
If you have overridden findAll methods of JmixDataRepository that previously returned Iterable, you should change the result type to List. For example:
public interface OrderRepository extends JmixDataRepository<Order, UUID> {
// before
@Override
Iterable<Order> findAll(Sort sort, @Nullable FetchPlan fetchPlan);
// after
@Override
List<Order> findAll(Sort sort, @Nullable FetchPlan fetchPlan);
}
The reason is that now JmixDataRepository implements ListCrudRepository as mentioned above.