Questions regarding jmix.ui.composite-menu usage and eliminating CUBA dependencies

Jmix version: 1.2.1
Jmix Studio plugin version: 1.2.0-213
IntelliJ IDEA 2021.3.2 CE - Build #IC-213.6777.52, built on January 28, 2022
Runtime version: 11.0.13+7-b1751.25 x86_64
Operating System: macOS 12.2.1 (21D62)
File System: Case-Sensitive Journaled HFS+ (APFS)
Datebase: PostgreSQL 13

Hi Everyone

Can you please help me with the following situation…

Use Case: After migrating from CUBA to Jmix I want to refactor my code and project to eliminate all of the CUBA code and dependencies. I want a pure Jmix implementation.

Problem: While searching for more information regarding this I found the following post:

When I set jmix.ui.composite-menu = false, as described in this article, the Administration menu is no longer available. It even cannot be found in the definitions of the FullAccessRole.

Here in the documentation Entity Inspector :: Jmix Documentation it states:

Open the Administration → Entity Inspector application screen and select the necessary entity from the Entity Type list.

so I assumed that when I installed the new Data Tools plug-in that it would automatically reinstall/enable the Jmix version of the Administration menu (if there is such a thing) but it does not. I must set jmix.ui.composite-menu = true to regain access to the Administration menu and the Entity inspector.

Can you please explain exactly what jmix.ui.composite-menu does for both the true and false cases and also provide more information about removing all of the CUBA code and dependencies from a migrated application.

Many thanks in advance.

Best regards

Hi Chris,

If I recall correctly, the flag means the following:

When true what it will do is that it will merge all the menu.xml definitions from all addons including your definitions in your apps menu.xml and render the menu as a superset of all those items.

When set to false, your apps menu.xml is the only menu that will be considered when rendering the menu.

Using false is a good idea when you completely control the menu entries that are rendered. It allows you to easily remove, change & reorder menu entries from e.g. the admin menu.

The downside is that you have to copy all entries that you want to appear there. If you don’t specify them in your menu.xml they will not appear. Independent if you added the addon or not.

I’m not sure how this question relates to the CUBA dependencies though, since this is quite a different topic :slight_smile:



Hi Mario

Thank you for the feedback and your efforts. Your information sounds logical and does explain the behavior that I see. It would also indicate that the jmix.ui.composite-menu property has nothing to do with anything specfically related to or dependent on CUBA, as the article that I refer to lead me to believe. After reading it, I assumed that setting jmix.ui.composite-menu to false would remove the CUBA Email history, Schedule Tasks and Application Properties sub-menus, etc. because I knew that this functionality was to be replaced with Jmix 1.2.x plug-ins and I was expecting a new UI for them. But I did not expect the Administration menu to completely disappear; I expected its visibility to only be dependent upon the role permissions.

Therefore, I now assume that when I install the new Email, Quarz and Application Settings plug-ins (I already installed Data Tools), the Adminstration sub-menus will point to this new Jmix functionality and not to the legacy CUBA functions. And my application will be less dependent upon CUBA. So maybe these topics are related just a little bit. :slight_smile:



in a migrated projec, Cuba → JMIX,
I needed to remove all imports in the coding which used .cuba. classes,
and I needed t remove this line from build.gradle:
implementation “io.jmix.cuba:jmix-cuba-starter”
After that all Cuba menu entries disappeared from the Administration menu.



Thanks for the information and and your time. I actually found the io.jmix.cuba:jmix-cuba-starter reference just after my last post (above) but I cannot remove it yet; I need to at least install the new Mail plugin, otherwise my project won’t compile. And I need to solve a Quarz installation problem before I get to that. I’ll update this article as soon I get further and remove the cuba-starter reference.