use of com.evolveum.midpoint.web.component.prism.show.ScenePanel in project midpoint by Evolveum.
the class ObjectDeltaOperationPanel method initLayout.
private void initLayout() {
// ObjectDeltaType od = getModel().getObjectDelta();
WebMarkupContainer objectDeltaOperationMarkup = new WebMarkupContainer(ID_OBJECT_DELTA_OPERATION_MARKUP);
objectDeltaOperationMarkup.setOutputMarkupId(true);
objectDeltaOperationMarkup.add(AttributeModifier.append("class", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return getBoxCssClass();
}
}));
add(objectDeltaOperationMarkup);
Label executionResult = new Label(ID_PARAMETERS_EXECUTION_RESULT, new PropertyModel(getModel(), "executionResult.status"));
executionResult.setOutputMarkupId(true);
objectDeltaOperationMarkup.add(executionResult);
Label resourceName = new Label(ID_PARAMETERS_RESOURCE_NAME, new PropertyModel(getModel(), ObjectDeltaOperationType.F_RESOURCE_NAME.getLocalPart()));
resourceName.setOutputMarkupId(true);
objectDeltaOperationMarkup.add(resourceName);
Label objectName = new Label(ID_PARAMETERS_OBJECT_NAME, new PropertyModel(getModel(), ObjectDeltaOperationType.F_OBJECT_NAME.getLocalPart()));
objectName.setOutputMarkupId(true);
objectDeltaOperationMarkup.add(objectName);
final SceneDto sceneDto;
try {
sceneDto = loadSceneForDelta();
} catch (SchemaException | ExpressionEvaluationException e) {
OperationResult result = new OperationResult(ObjectDeltaOperationPanel.class.getName() + ".loadSceneForDelta");
result.recordFatalError("Couldn't fetch or visualize the delta: " + e.getMessage(), e);
parentPage.showResult(result);
throw parentPage.redirectBackViaRestartResponseException();
}
IModel<SceneDto> deltaModel = new AbstractReadOnlyModel<SceneDto>() {
private static final long serialVersionUID = 1L;
public SceneDto getObject() {
return sceneDto;
}
};
ScenePanel deltaPanel = new ScenePanel(ID_DELTA_PANEL, deltaModel) {
@Override
public void headerOnClickPerformed(AjaxRequestTarget target, IModel<SceneDto> model) {
super.headerOnClickPerformed(target, model);
// model.getObject().setMinimized(!model.getObject().isMinimized());
target.add(ObjectDeltaOperationPanel.this);
}
};
deltaPanel.setOutputMarkupId(true);
objectDeltaOperationMarkup.add(deltaPanel);
}
use of com.evolveum.midpoint.web.component.prism.show.ScenePanel in project midpoint by Evolveum.
the class ModelOperationStatusPanel method initLayout.
protected void initLayout() {
add(new Label(ID_STATE, new StringResourceModel("ModelOperationStatusPanel.state.${}", new PropertyModel<ModelState>(getModel(), ModelOperationStatusDto.F_STATE))));
// add(new Label(ID_FOCUS_TYPE, new PropertyModel<String>(getModel(), ModelOperationStatusDto.F_FOCUS_TYPE)));
// add(new Label(ID_FOCUS_NAME, new PropertyModel<String>(getModel(), ModelOperationStatusDto.F_FOCUS_NAME)));
ScenePanel deltaPanel = new ScenePanel(ID_PRIMARY_DELTA, new PropertyModel<SceneDto>(getModel(), ModelOperationStatusDto.F_PRIMARY_DELTA));
deltaPanel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return getModelObject() != null && getModelObject().getPrimaryDelta() != null;
}
});
add(deltaPanel);
}
use of com.evolveum.midpoint.web.component.prism.show.ScenePanel in project midpoint by Evolveum.
the class TaskChangesPanel method initLayout.
protected void initLayout() {
// add(new Label(ID_TITLE, new AbstractReadOnlyModel<String>() {
// @Override
// public String getObject() {
// return getString(getModelObject().getTitleKey());
// }
// }));
ScenePanel deltaPanel = new ScenePanel(ID_PRIMARY_DELTA, new PropertyModel<>(getModel(), TaskChangesDto.F_PRIMARY_DELTAS));
deltaPanel.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return getModelObject() != null && getModelObject().getPrimaryDeltas() != null;
}
});
add(deltaPanel);
}
Aggregations