@MultipleOpen annotation not working

Hi Jmix team,

My system is currently using Tabbed-mode add-on and I want to prevent multiple instances of the same screen to be opened at the same time. I came across the @MultipleOpen annotation on the Jmix Documentation which is said to be false by default but I still can open multiple screens simultaneosly.

Have tried to set @MultipleOpen(value = false) as well but it didnt work as intended. After that I tried setting it in the application.properties file using jmix.tabmod.multiple-open=false but it did not work too.

Could you advise me on how to properly utilize this attribute to prevent multiple instances of the same screen opening?

P.S. The jmix.tabmod.multiple-open is false by default, but the annotation @MultipleOpen is true by default so its a little confusing too whether is it true/false by default.

Best regards,
Wei Jian.

Hi,

The @MultipleOpen annotation works as intended. As doc says:

When the @MultipleOpen annotation is present, no checks are performed and a new instance of the screen is simply opened in a new tab.

This means, that @MultipleOpen takes precedence over jmix.tabmod.multiple-open, and only its presence is checked. See io.jmix.tabbedmode.Views#isMultipleOpen.

Also, pay attention and the multiple open setting is only applied when a view is opened from the main menu, except when it is opened from a bean method. Check io.jmix.tabbedmode.builder.ViewOpeningContext#isCheckMultipleOpen usage.

Regards,
Gleb