use of com.evolveum.midpoint.web.component.AceEditor in project midpoint by Evolveum.
the class SchemaStep method createSchemaEditor.
private ITab createSchemaEditor() {
return new AbstractTab(createStringModel("SchemaStep.xml")) {
@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);
return xmlEditorPanel;
}
};
}
use of com.evolveum.midpoint.web.component.AceEditor in project midpoint by Evolveum.
the class XmlEditorPanel method initLayout.
@Override
protected void initLayout() {
AceEditor editor = new AceEditor(ID_ACE_EDITOR, getModel());
add(editor);
}
use of com.evolveum.midpoint.web.component.AceEditor in project midpoint by Evolveum.
the class AceEditorPanel method initLayout.
private void initLayout(int minSize) {
Label title = new Label(ID_TITLE, this.title);
add(title);
AceEditor editor = new AceEditor(ID_EDITOR, getModel());
editor.setReadonly(false);
if (minSize > 0) {
editor.setMinHeight(minSize);
}
add(editor);
}
use of com.evolveum.midpoint.web.component.AceEditor in project midpoint by Evolveum.
the class AceEditorFormGroup method initLayout.
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelSize, String textSize, boolean required, int rowNumber) {
WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
add(labelContainer);
Label l = new Label(ID_LABEL, label);
if (StringUtils.isNotEmpty(labelSize)) {
labelContainer.add(AttributeAppender.prepend("class", labelSize));
}
labelContainer.add(l);
Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
tooltipLabel.add(new AttributeAppender("data-original-title", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getString(tooltipKey);
}
}));
tooltipLabel.add(new InfoTooltipBehavior(isTooltipInModal));
tooltipLabel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return tooltipKey != null;
}
});
tooltipLabel.setOutputMarkupId(true);
tooltipLabel.setOutputMarkupPlaceholderTag(true);
labelContainer.add(tooltipLabel);
WebMarkupContainer textWrapper = new WebMarkupContainer(ID_TEXT_WRAPPER);
if (StringUtils.isNotEmpty(textSize)) {
textWrapper.add(AttributeAppender.prepend("class", textSize));
}
add(textWrapper);
AceEditor text = new AceEditor(ID_TEXT, getModel());
text.add(new AttributeModifier("rows", rowNumber));
text.setOutputMarkupId(true);
text.setRequired(required);
text.setLabel(label);
text.add(AttributeAppender.replace("placeholder", label));
textWrapper.add(text);
}
use of com.evolveum.midpoint.web.component.AceEditor in project midpoint by Evolveum.
the class PageResourceEdit method editPerformed.
private void editPerformed(AjaxRequestTarget target, boolean editable) {
AceEditor editor = (AceEditor) get(createComponentPath(ID_MAIN_FORM, ID_ACE_EDITOR));
editor.setReadonly(!editable);
editor.refreshReadonly(target);
}
Aggregations