use of com.evolveum.midpoint.web.page.admin.configuration.component.ObjectPolicyPanel in project midpoint by Evolveum.
the class ObjectPolicyConfigurationEditor method editPerformed.
private void editPerformed(AjaxRequestTarget target, ListItem<ObjectPolicyConfigurationTypeDto> item) {
ObjectPolicyPanel objectPolicyPanel = new ObjectPolicyPanel(getPageBase().getMainPopupBodyId(), item.getModelObject()) {
private static final long serialVersionUID = 1L;
@Override
protected void savePerformed(AjaxRequestTarget target) {
ObjectPolicyConfigurationTypeDto oldConfig = getModel().getObject().getConfig();
ObjectPolicyConfigurationTypeDto newConfig = getModel().getObject().preparePolicyConfig();
ObjectPolicyConfigurationEditor.this.replace(oldConfig, newConfig);
ObjectPolicyConfigurationEditor.this.getPageBase().hideMainPopup(target);
target.add(ObjectPolicyConfigurationEditor.this);
}
};
objectPolicyPanel.setOutputMarkupId(true);
getPageBase().showMainPopup(objectPolicyPanel, target);
// ObjectPolicyPanel window = (ObjectPolicyPanel) get(ID_TEMPLATE_CONFIG_MODAL);
// window.updateModel(target, (ObjectPolicyConfigurationTypeDto)item.getModelObject());
// window.show(target);
}
Aggregations