проблема такая у меня несколько классов которые наследуются от класса Window, из них я делаю модальные окна и у одного окна проблема с полосой прокрутки, она пропадает как только я нажимаю на содержимое окна, у остальных окон такого нет, что это может быть?
Код:
public class UserEditWindow extends Window {
private static final java.util.logging.Logger LOGGER = java.util.logging.Logger.getLogger(UserEditWindow.class.getSimpleName());
private static final ResourceBundle resourceBundleOS = ResourceBundle.getBundle(Helper.RESOURCE_BUNDLE_I18N_CDSGUI, Locale.getDefault());
private User entity;
final BeanFieldGroup<User> fieldGroup = new BeanFieldGroup<>(User.class);
final List<CheckBox> roleFields = new ArrayList<>();
ResourceBundle resourceBundleWeb;
ConfigurationBean bean = new ConfigurationBean();
SysConfigBean CFG;
boolean newUser;
final FormLayout fl = new FormLayout();
HashMap<String, Boolean> adminRoles = new HashMap<>();
HashMap<String, Boolean> deployRoles = new HashMap<>();
HashMap<String, Boolean> dvmRoles = new HashMap<>();
HashMap<String, Boolean> supplyRoles = new HashMap<>();
HashMap<String, Boolean> techRoles = new HashMap<>();
public UserEditWindow(SysConfigBean CFG, ResourceBundle resourceBundleWeb) {
this(null, CFG, resourceBundleWeb);
this.resourceBundleWeb = resourceBundleWeb;
this.CFG = CFG;
}
public UserEditWindow(User entity, SysConfigBean CFG, ResourceBundle resourceBundleWeb) {
this.resourceBundleWeb = resourceBundleWeb;
this.CFG = CFG;
setModal(true);
setWidth(40, Unit.EM);
setResizable(false);
newUser = entity == null;
if (newUser) {
LOGGER.info(resourceBundleWeb.getString(ResourceKeys.UserEditWindow_User_NewUser.toString()));
setCaption(resourceBundleWeb.getString(ResourceKeys.UserEditWindow_User_NewUser.toString()));
this.entity = new User();
RolesManager.setAdminCreateRole(false);
RolesManager.setDeployCreateRole(false);
RolesManager.setDvmCreateRole(false);
RolesManager.setTechCreateRole(false);
RolesManager.setSupplyCreateRole(false);
} else {
RolesManager.setAdminCreateRole(true);
RolesManager.setDeployCreateRole(true);
RolesManager.setDvmCreateRole(true);
RolesManager.setTechCreateRole(true);
RolesManager.setSupplyCreateRole(true);
LOGGER.info(resourceBundleWeb.getString(ResourceKeys.UserEditWindow_User_EditingUser.toString()));
LOGGER.info("newUser " + newUser);
setCaption(resourceBundleWeb.getString(ResourceKeys.UserEditWindow_User_EditingUser.toString()));
this.entity = entity;
}
fl.removeAllComponents();
if (fl == null) {
Object[] objArgs = {ErrorCodes.UserEditWindow_FormLayout_Fl_Exception_Exception_Log.getValue()};
MessageFormat form1 = new MessageFormat(resourceBundleWeb.getString(ResourceKeys.UserEditWindow_FormLayout_Fl_Exception_Caption.toString()));
MessageFormat form2 = new MessageFormat(resourceBundleOS.getString(ResourceKeys.UserEditWindow_FormLayout_Fl_Exception_Exception_Msg_Log.toString()));
Notification.show(form1.format(objArgs), Notification.Type.ERROR_MESSAGE);
LOGGER.severe(form2.format(objArgs));
}
initFieldGroup(newUser);
fl.addComponents(fieldGroup.getFields().toArray(new Field[0]));
Label rolesLabel = new Label(resourceBundleWeb.getString(ResourceKeys.UserEditWindow_FormLayout_Label_RolesLabel.toString()));
if (rolesLabel == null) {
Object[] objArgs = {ErrorCodes.UserEditWindow_FormLayout_Label_RolesLabel_Exception_Log.getValue()};
MessageFormat form1 = new MessageFormat(resourceBundleWeb.getString(ResourceKeys.UserEditWindow_FormLayout_Label_RolesLabel_Exception_Caption.toString()));
MessageFormat form2 = new MessageFormat(resourceBundleOS.getString(ResourceKeys.UserEditWindow_FormLayout_Label_RolesLabel_Exception_Msg_Log.toString()));
Notification.show(form1.format(objArgs), Notification.Type.ERROR_MESSAGE);
LOGGER.severe(form2.format(objArgs));
}
rolesLabel.setStyleName("h3");
fl.addComponent(rolesLabel);
initRoleFields();
roleFields.forEach(checkBox -> {
fl.addComponent(checkBox);
fl.addComponent(initCrudCheckBox(checkBox));
});
fl.addComponent(createButtons());
fl.setWidth(100, Unit.PERCENTAGE);
fl.setSpacing(true);
fl.setMargin(true);
setContent(fl);
}