Skip to content

Commit

Permalink
Merge branch 'support-4.0' of https://github.com/Evolveum/midpoint in…
Browse files Browse the repository at this point in the history
…to support-4.0
  • Loading branch information
KaterynaHonchar committed Mar 11, 2020
2 parents 6e17a22 + f301d2e commit 22aa8cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Expand Up @@ -148,12 +148,16 @@ private ITab createSchemaEditor() {

@Override
public WebMarkupContainer getPanel(String panelId) {
XmlEditorPanel xmlEditorPanel = new XmlEditorPanel(panelId, createXmlEditorModel());
// quick fix: now changes from XmlEditorPanel are not saved anyhow
//(e.g. by clicking Finish button in wizard). For now,
//panel is made disabled for editing
AceEditor aceEditor = (AceEditor) xmlEditorPanel.get(ID_ACE_EDITOR);
aceEditor.setReadonly(true);
XmlEditorPanel xmlEditorPanel = new XmlEditorPanel(panelId, createXmlEditorModel()) {

// quick fix: now changes from XmlEditorPanel are not saved anyhow
//(e.g. by clicking Finish button in wizard). For now,
@Override
protected boolean isEditEnabled() {
return false;
}
};

return xmlEditorPanel;
}
};
Expand Down
Expand Up @@ -7,6 +7,7 @@

package com.evolveum.midpoint.web.component.wizard.resource.component;

import com.evolveum.midpoint.web.component.util.EnableBehaviour;
import org.apache.wicket.model.IModel;

import com.evolveum.midpoint.gui.api.component.BasePanel;
Expand All @@ -32,6 +33,11 @@ protected void onInitialize() {

protected void initLayout() {
AceEditor editor = new AceEditor(ID_ACE_EDITOR, getModel());
editor.setReadonly(!isEditEnabled());
add(editor);
}

protected boolean isEditEnabled() {
return true;
}
}

0 comments on commit 22aa8cc

Please sign in to comment.