Jmix version: 1.1.2
Jmix Studio plugin version: 1.1.4-213
IntelliJ IDEA 2021.3 CE - Build #IC-213.5744.223, built on November 27, 2021
Operating System: macOS 12.0.1 (21A559)
File System: Case-Sensitive Journaled HFS+ (APFS)
Datebase: PostgreSQL 13
Hi Everyone
#1. After my CUBA-to-Jmix migration I deleted my ext-change-password-dialog.xml screen and controller (originally generated from a legacy screen in CUBA Studio) and generated a new Jmix ext-change-password-dialog.xml screen and controller in Jmix Studio (below). The result is basically identical to the CUBA version.
But now I cannot open the dialog and receive the following exception…
java.lang.IllegalArgumentException: Dialog cannot be opened without username
at io.jmix.core.common.util.Preconditions.checkNotNullArgument(Preconditions.java:101)
at io.jmix.securityui.screen.changepassword.ChangePasswordDialog.onAfterShow(ChangePasswordDialog.java:102)
at io.jmix.core.common.event.EventHub.publish(EventHub.java:170)
at io.jmix.ui.screen.Screen.fireEvent(Screen.java:124)
SCREEN
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://jmix.io/schema/ui/window"
extends="io/jmix/securityui/screen/changepassword/change-password-dialog.xml"
xmlns:ext="http://schemas.haulmont.com/cuba/1.1/window-ext.xsd">
<layout>
<label value="msg://com.company.nf.web.screens.member/passwordFormatText" ext:index="0"/>
</layout>
</window>
CONTROLLER
package com.company.nf.screen.extchangepassworddialog;
import io.jmix.ui.screen.UiController;
import io.jmix.ui.screen.UiDescriptor;
import io.jmix.securityui.screen.changepassword.ChangePasswordDialog;
@UiController("ext_ChangePasswordDialog")
@UiDescriptor("ext-change-password-dialog.xml")
public class ExtChangePasswordDialog extends ChangePasswordDialog {
}
CALLING CODE (take from my CUBA code)
private void showChangePasswordDialog() {
screenBuilders.screen(this)
.withScreenClass(ExtChangePasswordDialog.class)
.withOpenMode(OpenMode.DIALOG)
.build()
.show();
}
This was not a problem in CUBA. What option(s) do I need to pass to screenBuilders for this? Other solution?
#2. Please also note… I added my own label to the dialog to display the required password format and when I moved it above the textFields in Studio, Studio automatically added the following line:
xmlns:ext="http://schemas.haulmont.com/cuba/1.1/window-ext.xsd">
I assume, that this should be replaced by a Jmix reference. Any suggestions about this? Ignore it for now? Remove it?
Best regards
Chris