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.
The component is provided by the GroupDataGrid add-on which requires an Enterprise or BPM subscription.
To include the add-on in your project, make sure your build.gradle
defines access to the premium repository and add the following dependency:
implementation 'io.jmix.groupgrid:jmix-groupgrid-flowui-starter'
The groupDataGrid
component can be used in a view as follows:
<view xmlns="http://jmix.io/schema/flowui/view"
xmlns:groupg="http://jmix.io/schema/groupgrid/ui"
...
<layout>
<groupg:groupDataGrid id="ordersDataGrid" width="100%" minHeight="20em"
dataContainer="ordersDc" columnReorderingAllowed="true">
<groupg:actions>
<groupg:action id="createAction" type="list_create"/>
<groupg:action id="editAction" type="list_edit"/>
...
</groupg:actions>
<groupg:groupBy>
<groupg:columnRef key="client"/>
</groupg:groupBy>
<groupg:columns resizable="true">
<groupg:groupColumn header="Groups"/>
<groupg:column property="client"/>
<groupg:column property="date"/>
...
</groupg:columns>
</groupg:groupDataGrid>
...
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
JmixDataRepository
interface now extendsorg.springframework.data.repository.ListCrudRepository
, and all itsfindAll()
methods that previously returnedIterable
now returnList
. -
Jmix data repositories now support queries returning scalar values and aggregates. See the @Query annotation usage examples.
-
The
JmixDataRepository
methods returningPage
perform additionalcount
request to the database to provide total number of items and pages in thePage
object. 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
LoadContext
object. 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:
Before:
public interface OrderRepository extends JmixDataRepository<Order, UUID> {
@Override
Iterable<Order> findAll(Sort sort, @Nullable FetchPlan fetchPlan);
}
After:
public interface OrderRepository extends JmixDataRepository<Order, UUID> {
@Override
List<Order> findAll(Sort sort, @Nullable FetchPlan fetchPlan);
}
The reason is that now JmixDataRepository
implements ListCrudRepository
as mentioned above.